Re: Simple backups
schnitzel meister <email@example.com> wrote:
> On 5/10/05, Michael F. Sprague <firstname.lastname@example.org> wrote:
> > schnitzel meister <email@example.com> wrote:
> > > Hello.
> > > I have lots of hosts running Sarge.
> > > The data on each of the hosts is generally in a defined location, the
> > > rest of the machine is the same.
> > >
> > > I would like to run a regular job on each host to create an archive of
> > > just these
> > > unique files, as defined by a file which might look like:
> > >
> > > /etc/postfix/
> > > /etc/someconfig.conf
> > >
> > > The archive would be collected by a remote scp nightly.
> > >
> > > I cannot find a package which does this task, I wondered if anyone
> > > could suggest one?
> > > If not, I'll write a script. Thanks.
> > Sounds like a job for rsync. :)
> > Rsync users ssh for transfer and you can have include files pretty much in the
> > format you describe above.
> > thanks,
> > M
> Can I ask why rsync? I need to fetch an archive of just the files
> listed in a file.
> I'm not sure I understant where would I use rsync? Thanks.
Well, you could use rsync to get the remote files you're interested in to a
central location on your archive server. Then you can archive them in any way
you see fit. For example, you could make one big gzipped tarball, you could
put them onto tape using tar or other backup software (e.g. amanda) or you
could leave the files intact for each online retrieval.
If you always keep the archive 'tree' intact, the advantage of rsync is that it
will only do the transfer if a file as changed, and then it will only upload
the portions of the file that have changed. So the archive process should be
very quick; at least the part on the network.
You can craft an include file for rsync that would only grab the files and
directories you want from the remote server(s). Then you write a script that
calls rsync for each remote server with the appropriate arguments.
Just a thought. There are dozens of methods available to accomplish what you
Michael Sprague | firstname.lastname@example.org
System and Network Engineering (SaNE), Inc