Results 1 to 3 of 3
I have two identical hard drives, and have used dd to make one a duplicate of the boot drive.
I have set up rsync (as root ) to run nightly ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-14-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 2
Using rysync to mirror entire system - what to omit
I have two identical hard drives, and have used dd to make one a duplicate of the boot drive.
I have set up rsync (as root) to run nightly to mirror the backup drive from the boot drive. There are a bunch of directories/files that fail (mainly is /sys) due to lack of permission - some of the sys files are write-only.
Can someone suggest what directories I can exclude from the mirroring?
I would like to be able to either boot the backup drive in case of a boot drive failure, or reinstall Ubuntu on a new disk, then copy the files back from the backup (or use dd, or whatever)
Any thoughts?
Thanks
- 02-15-2011 #2
/sys and /proc are virtual filesystems that provide info on the kernel, devices, drivers, processes, etc. Both can be excluded.
In general I would say it's easier and probably faster to reinstall that re-copy everything. I just backup configuration files and of course personal files. So my whole /home directory and then /etc and possibly /root if you've configured anything there for the root user.
Beyond that, I backup a list of installed packages for easy reinstallation. How to do this depends on your package manager. For example in Ubuntu you can do
and reinstall withCode:sudo dpkg --get-selections > installed-applications.txt
For Arch I useCode:sudo dpkg --set-selections < installed-applications.txt sudo apt-get -y update sudo apt-get dselect-upgrade
and can reinstall withCode:pacman -Qqe > installed-packages.txt
If you have limited bandwith or a slow internet connection, you might want to backup the package cache. Again, the location varies distro to distro, but should be in /var somewhere. I think Ubuntu is /var/cache/apt/archives.Code:pacman -S $(< installed-packages.txt)
- 02-15-2011 #3Just Joined!
- Join Date
- Jan 2011
- Posts
- 2


Reply With Quote

