You are not logged in.

#1 2015-07-29 11:35:58

Fred7109
Member
Registered: 2015-05-17
Posts: 134

'Best way' to make a full system backup

Hi,
I have a question regarding full system backup, because there are some questions where it does not seem to me that there is a definitive answer, mainly because some of the wiki I do not understand 100%. I hope you will help answer the questions:
- My understanding says that Linux do not have a registry, like windows? Which means that all configuration is in files, mainly in the .config folder?
- So with rsync as described here, I would could copy all files in /, and then all settings programs etc. will follow with me?
       - So if I have a new SSD i would could use this rsync command - as described in link above - and move all my files, programs, programs settings, with other word: whole my system with me? Just by moving to my new system and pasting all the files in?
- But what about the UDID. Should it not be updated when I use a different disk?
- Is there a better way to migrate your system to a new harddisk? For an example, where I could have a live disk to boot up - and then on another partition have the backup file, so I just could run the program from the live disk and extract the files from the backup to the other partition. So I after that just could boot up my system as a normal system - with the system which was in my backup file?

Last edited by Fred7109 (2015-07-29 11:38:06)

Offline

#2 2015-07-29 12:08:08

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: 'Best way' to make a full system backup

https://wiki.archlinux.org/index.php/Backup_programs
https://wiki.archlinux.org/index.php/Fu … with_rsync

In the past, I have used `dd` to migrate my current Arch system from a USB stick to the internal SSD of a new laptop.

The only caveat is that $TARGET must be as big or bigger than $SOURCE and the partition(s) and the underlying filesystem(s) need to be expanded afterwards to take up any extra space.

The advantage of this method is that `dd` copies on the sector level so the UUIDs remain the same.

Offline

#3 2015-07-29 12:35:54

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: 'Best way' to make a full system backup

Fred7109 wrote:

- My understanding says that Linux do not have a registry, like windows? Which means that all configuration is in files, mainly in the .config folder?

per-user configuration files are mostly stored in ~/.config/, or some other hidden directory/file in your /home. System wide configuration files are mostly stored in /etc, but there could be other files too. For example the boot loader configuration is usually stored in /boot. Since you configured your system yourself, you should also be aware of which configuration files you have modified.

Fred7109 wrote:

- So with rsync as described here, I would could copy all files in /, and then all settings programs etc. will follow with me?
       - So if I have a new SSD i would could use this rsync command - as described in link above - and move all my files, programs, programs settings, with other word: whole my system with me? Just by moving to my new system and pasting all the files in?
- But what about the UDID. Should it not be updated when I use a different disk?

rsync should copy everything. Of course you'd have to fix UUIDs on new partitions, and anything else that could've changed.

Fred7109 wrote:

- Is there a better way to migrate your system to a new harddisk? For an example, where I could have a live disk to boot up - and then on another partition have the backup file, so I just could run the program from the live disk and extract the files from the backup to the other partition. So I after that just could boot up my system as a normal system - with the system which was in my backup file?

You could create compressed tar file from your backup and extract it from live disk, but It's really bad idea to store your backup on same disk as the original system: If your hard disk fails, you would lose all your backups with it.

Offline

#4 2015-07-29 12:53:04

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: 'Best way' to make a full system backup

Fred7109 wrote:

- My understanding says that Linux do not have a registry, like windows? Which means that all configuration is in files, mainly in the .config folder?

Yes. Linux doesn't have a registry. All user settings are saved in your home directory as "dot files" (many of which are in "~/.config"). Also, most system settings are saved in "/etc".

Fred7109 wrote:

- So with rsync as described here, I would could copy all files in /, and then all settings programs etc. will follow with me?

Yes.

Fred7109 wrote:

- So if I have a new SSD i would could use this rsync command - as described in link above - and move all my files, programs, programs settings, with other word: whole my system with me? Just by moving to my new system and pasting all the files in?

You will probably need to do a few extra steps. Make sure the "/etc/fstab" file is correct and that your boot loader has been installed.

Fred7109 wrote:

- Is there a better way to migrate your system to a new harddisk? For an example, where I could have a live disk to boot up - and then on another partition have the backup file, so I just could run the program from the live disk and extract the files from the backup to the other partition. So I after that just could boot up my system as a normal system - with the system which was in my backup file?

My suggestion: Use "CloneZilla" Linux. It was designed for what you are doing. It is easy to use and will copy your data from one drive to another drive.

Most important: Keep your old drive with the old data until you are SURE everything was copied and working correctly! smile

Offline

#5 2015-07-29 16:51:50

MightyPork
Member
From: Prague, Czech Republic
Registered: 2014-06-16
Posts: 93
Website

Re: 'Best way' to make a full system backup

Perhaps a better idea than migrating the entire system would be to make a fresh install and selectively migrate the important files / config.
I'd get important config from /etc (apache setup, netctl profiles, fstab for reference, pacman.conf...), perhaps entire /home, make a list of packages you want, and reinstall them on the new disk.

Last edited by MightyPork (2015-07-29 16:52:19)


If it ain't broke, pacman -Syyu and it will be

Offline

#6 2015-07-29 17:27:06

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: 'Best way' to make a full system backup

As far as issues with UUID go, you can also set up fstab to use labels. I personally prefer this since it makes the fstab more human readable. It also avoids issues with trying to restore my backups.

Offline

#7 2015-08-12 01:37:25

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: 'Best way' to make a full system backup

 # rsync -aAXhv --exclude={/dev/*,/home/*,/media/*,/mnt/*,/proc/*,/run/*,/sys/*,/tmp/*,/var/lib/pacman/*,/lost+found} /* /mnt/path/to/backup/$(date -I) 

This backs up the OS and can be reverse rsync'd to restore the OS or move it to another drive. It doesn't backup /home, assuming you'll back your data up somewhere else. You might want to backup /var/lib/pacman if the package tarballs are stored there, in which case, remove "/var/lib/pacman/*," from the script. I omit it as I have pacman save the tarballs in /home/me/.pacman/pkg. This rsync creates a folder with the date that you run the script named "YYYY-MM-DD". It may take a few minutes to run for a 10-15GB install. When using this backup to restore the system or install on a different drive, you'll probably have to boot with live disk and chroot to re-make grub config. At the very least, you'll have, as MightyPork mentioned, important files for reference if you have to do complete new install.


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

Board footer

Powered by FluxBB