Can rsync be used to back up system settings/configurations?

Can rsync be used to back up system settings/configurations?

Post by piscesbo » Mon, 28 Sep 2009 00:44:35


I've never used rsync before, and before I dive in, I wanted to know
if anyone has used it to take snapshots of their hard drive at
different points in time and save system settings, programs, etc...? I
know it is designed to save files and keep a record of changes of
files, etc...but what's been your experience backing up your system
using it?
 
 
 

Can rsync be used to back up system settings/configurations?

Post by Unru » Mon, 28 Sep 2009 01:15:48

piscesboy < XXXX@XXXXX.COM > writes:


That is one of the key uses for rsync. Remember that on a Unix system,
almost everything is a file. Thus if you save files you save the system.
And if you use the hard link option you can also save vast amounts of
space as well, since the system will only transfer the changes, and
store separate copies of changed files
Do not save /proc or /sys as they are generated by the kernel each time
it runs. They are not and do not contain files on the hard drive.
Note also that the is a program called rsnapshot which helps automate
the making of snapshots of your hard driver using rsync.

 
 
 

Can rsync be used to back up system settings/configurations?

Post by The Natura » Mon, 28 Sep 2009 01:24:46


the key to recovering a working system after e.g. a hardware crash, is
to work out which bits change when you change hardware. I haven't done
this in anger for some years but it takes a little bit of messing
around, but then, yes, you can clone a machine to a different hardware
platform fairly quickly using any file backup system.
 
 
 

Can rsync be used to back up system settings/configurations?

Post by Unru » Mon, 28 Sep 2009 01:47:33

The Natural Philosopher < XXXX@XXXXX.COM > writes:



Agreed. But assuming that your kernel contains the modules for the new
hardware ( the advantage of distro kernels which tend to support
everything including the kitchen sink garborator), then the key files
are
/etc/fstab-- to make sure that the mount points and the disk partitions
are properly matched
/etc/modules and /etc/modprobe.conf and /etc/modprobe.d to load up the
modules you hardware needs.
 
 
 

Can rsync be used to back up system settings/configurations?

Post by Florian Di » Mon, 28 Sep 2009 03:25:20

Unruh < XXXX@XXXXX.COM > writes:



With modern kernels udev takes care of loading the needed modules so
usually you don't need to configure anything here. But udev creates some
hardware-specific rule files (/etc/udev/rules.d/*persistent*.rules)
which you need to remove. Sometimes /etc/X1/xorg.conf needs to be
changed, too.



Florian
--
< http://www.yqcomputer.com/ ;
 
 
 

Can rsync be used to back up system settings/configurations?

Post by Nico Kadel » Mon, 28 Sep 2009 21:01:02


Go look up "rsnapshot". I've used it very effectively, privately and
commercially, to manage rsync for precisely such usage. Coupled with
the use of SSH keys and the 'validate-rsync' tool to manage SSH keys
for remote backup use only, it is very much my friend. It also
supports multi-platform use for numerous Linux and UNIX distributions,
and even works effectively for Windows boxes by CIFS mounting their
hard drives on the cheap, designated Linux server with a lot of cheap
disk, and snapshotting that CIFS network mounted directory. (Don't try
runnig rsync this way directly under Windows, even with Cygwin, it
just doesn't work well.)

There's even a commercial service for this, www.rsnapshot.com, if
you'd like to hand off the backup issues to someone off-site.
 
 
 

Can rsync be used to back up system settings/configurations?

Post by Nico Kadel » Mon, 28 Sep 2009 21:12:38

n Sep 26, 1:25m, Florian Diesch < XXXX@XXXXX.COM > wrote:

Not just. If you do a clean installation, in many cases, users like
'named' or 'httpd' or 'nagios' can wind up with different uid's and
gid's, so you can't just slap in the old /etc/
{groups,passwd,shadow,gshadow} files to restore the old accounts. But
a well thought out on-line backup system, such as rsync and rsnapshot,
can include '/etc/' and give you access to those files. (OK, leave
out /etc/gconf.d/: that directory should be in /var anyway, not /
etc/!)

That's partly why I like using real package management (such as deb or
RPM) and being sure to get a list of all the software packages nightly
(such as /var/log/rpmpkgs). It provides a better chance of knowing
what that system had in place, rather than having to decipher whatever
people happened to install in /usr/local/bin from goddess-only-knows
what source tree.