[CentOS] Linux backup help

Phil Schaffner Philip.R.Schaffner at NASA.gov
Mon Nov 10 21:57:17 UTC 2008


Kevin Kempter wrote:
> Hi All;
> 
> I'm awaiting a new linux laptop that will be my primary work machine. I want 
> to implement a strategy that allows me as easily as possible to revert back 
> to a former state. My primary concern is a scenario where I apply system 
> updates and it breaks something that for me is critical.   
> 
> I wonder if a simple rsync script would work. If so, here's what I'm thinking:
> 
> 1) updates are available so I execute the rsync script which pulls any updated 
> files from my laptop to a backup server/drive
> 
> 2) apply updates
> 
> 3) if something breaks (even if I can no longer login) I boot the laptop, run 
> the rsync script in the opposite direction (push files from the backup drive 
> to the laptop) 
> 
> I assume that if I were to execute step 3 above that my system would be in the 
> exact state that it was before I ran the updates. Is this a correct 
> assumption ? 

Depends in part on the rsync commands, the file structure, and the order 
of operations.  Restoring over a running system would overwrite files 
that are in use, particularly in /etc and /var - not a good idea. 
Restoring from a backup of a live system would restore copies of files 
that might have been in the process of being changed.  Would be safer to 
do this using a live CD for both the backup and the restore.  Would want 
to do the backup/restore on a per-filesystem basis.  Assuming you have / 
/boot and /home:

rsync --archive --delete --hard-links --one-file-system / /backup/laptop/

rsync --archive --delete --hard-links --one-file-system /boot/ 
/backup/laptop/boot/

rsync --archive --delete --hard-links --one-file-system /home/ 
/backup/laptop/home/

On restore would need to mount and restore / first, then mount other 
partitions and restore them.

> Are there better approaches ?

Perhaps using other backup tools (backuppc has been mentioned favorably 
recently), but it should be workable; however, this sounds like a 
time/labor-intensive approach every time there are updates, for a low 
probability of fatal problems with the OS.  Just backing up user files 
would be a lot faster and easier.

Phil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Philip_R_Schaffner.vcf
Type: text/x-vcard
Size: 354 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20081110/92294ae0/attachment.vcf>


More information about the CentOS mailing list