Pierre Baco Posted February 28, 2005 Report Share Posted February 28, 2005 Hi guys (and girls). I'm working on a simple script to mirror my partitions on a spare disk using rsync, and I've a question about the /sys dir: should I rsync it or just exclude it ? What I want is a spare disk I could swap with the original one in case of serious trouble. Both disks (hda and hdc) have the same size. I've just 2 partitions (/ and /home) on hda. I've done a first dd if=/dev/hda of=/dev/hdc to duplicate the whole disk including MBR. Now I want to run a rsync script every night to update hdc, something like mount /dev/hc1 /mnt/sync_dir rsync -uravH --delete --exclude-from=exclude_root.lst / /mnt/sync_dir umount /mnt/sync_dir mount /dev/hc2 /mnt/sync_dir rsync -uravH --delete --exclude-from=exclude_home.lst /home /mnt/sync_dir umount /mnt/sync_dir It works fine (0 errors) for /home but I get a rsync error 23 ("some files could not be transfered") while rsync'ing / when /sys is not in the exclude_root.lst file, which looks like: /proc /mnt /home /etc/fstab /tmp I know /sys has something to do with udev and hotplugging. Is it safe to exclude it ? (i.e. Will the spare disk boot correctly if /sys has not been updated ?). Thanx in advance for your (always appreciated) input.;) Pierre Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted March 1, 2005 Report Share Posted March 1, 2005 I'm no expert, but it's my opinion that it won't matter.../sys should be populated dynamically. I'm surprised you didn' get errors rsync'ing /proc as well, because it should be dynamic also. Quote Link to comment Share on other sites More sharing options...
iphitus Posted March 1, 2005 Report Share Posted March 1, 2005 sys/sysfs is information generated by the kernel, in a similar way to proc. Im just thinking that if you want to have your partition mirrored, you could probably do something with software based raid. Quote Link to comment Share on other sites More sharing options...
Pierre Baco Posted March 2, 2005 Author Report Share Posted March 2, 2005 Thanks. I'm gonna exclude /sys just like I did with /proc and give a try to reboot with the spare disk after a full rsync. Pierre Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.