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

begin:vcard
fn:Philip Schaffner
n:Schaffner;Philip
org:NASA Langley Research Center;Electromagnetics and Sensors Branch
adr:Mail Stop 473;;8 North Dryden Street;Hampton;VA;23681;USA
email;internet:[EMAIL PROTECTED]
title:Aerospace Technologist
tel;work:757-864-1809
tel;fax:757-864-7891
x-mozilla-html:FALSE
version:2.1
end:vcard

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to