Gee Ah, Uqi is not a big God, understand is fur. And not caught dead. Only as a record of effect.
Tar backup arch:
Create a exclude list to exclude files that do not need to be backed up. Example:
#vi/EXCL
/proc/*/dev/*/sys/*/tmp/*/mnt/*/media/*/run/*/var/lock/*/var/run/*/var/lib/pacman/*/var/cache/ Pacman/pkg/*/lost+found
Prepare a LiveCD, which is to install the arch U-disk.
Insert the U-disk, enter the BIOS, set the U-disk for priority start.
Enter the U-disk system and mount the partition of the original system. Example:
Mount /dev/sda2/mntmkdir /mnt/{boot,home}mount /dev/sda1/mnt/ BootMount /dev/sda3/mnt/home
Once mounted, the chroot can be executed to enter the system to be backed up.
arch-chroot /mnt/usr/bin/bash
After entering, execute
tar cvpjf backup20160910. tar. bz2--exclude-from=/excl/
Note: Here excl is the filter list created at the beginning, and if it is not within the execution path of the tar command, the path should be written intact.
It is recommended here that the tar execution path is not included in the path that needs to be packaged, that is, the tar execution path is best placed in a folder in the Excl list, just to prevent recursive backups.
Finally, make sure you have enough disk space.
In this way, the entire system is packaged. In the tar execution path, you should see the backup file.
The backup package can be used to restore and migrate the system.
Tar recovery arch:
First, insert the U-Disk into the LiveCD.
Plan your partitions and format what you see in Archwiki's Beginner ' s Guide.
Similarly, mount the partition. Example:
Mount /dev/sda2/mntmkdir /mnt/{boot,home}mount /dev/sda1/mnt/ BootMount /dev/sda3/mnt/home
Of course, you need to hang the storage partition on the backup package. Example:
mkdir /backupMount /dev/sda4/backup
wherein, the storage location of the backup package is SDA4, here inserted a sentence, how can we tell which space the sdax corresponds to? Anyway I was based on size =. =
Create a temporary directory/backup as a mount point for the sda4.
Final execution:
CD/mnttar xvpjf/backup/backup20160910. tar. bz2
Unzip the backup package to the appropriate location.
Then generate Fstab:
Genfstab-u-p/mnt >>/mnt/etc/fstab
It is recommended to check the correctness of/etc/fstab after the execution is completed.
Then go to the restored system:
arch-chroot /mnt/bin/bash
Reconfigure boot boot:
Grub-mkconfig-o/boot/grub/grub.cfg
In this way, the backup package is restored.
Exit chroot, uninstall the directory, reboot, should be able to enter the system, or familiar faces.
Exit Umount -r/Mntreboot
Something:
Gee Ah, Uqi is also the first time to write a blog, and is the blog park such a large platform, written here or rocky 0v0. Uqi also has self-knowledge, the beginning of the application to write the rights of the blog when also stated: Borrow the garden such a good place, learning, side record. In fact, Uqi is also just touching Linux, this June when the Dragon Boat Festival. Toss for three months, has been tossing, because it always comes out of inexplicable problems, some solved, some did not solve. After hindsight, in the process of tossing, although did not learn what substantive technology, but at least to understand some of the framework of dealing with the problem of the model, oneself can also solve some small problems, it is very helpful to themselves.
As a matter of fact, Uqi has been tossing and writing about three or four times. In the beginning to pretend to play, Linux this part of the space is too small. The period was added one or two times, plus this big change, re-zoned the partition table. Each operation is re-find the tutorial, so this time to write it down, convenient to view later, O (∩_∩) o haha ~
Well, that's it, Uqi first blog, Hope Crossing Mercy Ah, any advice I will listen to. Thank you ~
About ArchLinux Backup