[Nottingham] Backups: How do you do yours?
Mat Booth
mbooth at fedoraproject.org
Wed Mar 16 13:59:56 UTC 2011
On 16 March 2011 09:08, Simon Sleaford <simon.sleaford at gmail.com> wrote:
> Hello all
> I've been asked to look at backing up one Windows machines to another but
> due to financial constraints with my employer we're not going to be getting
> any new software to help out. We were previously using Symantec Backup Exec
> but it seems it cannot handle large volumes such as the amounts we need to
> backup (~1.5 terabytes.) Trying to do so has resulted in very hit and miss
> integrity of backups with about 1 in 3 files being corrupt and therefore
> unusable.
> I'd really like to be able to use a Linux machine to do backup the data if I
> can. I've created a Debian virtual machine, mounted the two filesystems and
> used a simple rsync -a /path/to/source /path/to/destination command and was
> pleased with the amount of time it took. I'd like to make it a bit more
> efficient if I can though so I've created added some commands into a cron
> file. Here are the contents of the file:
> 15 17 * * * rsync -a /san1/data /nas1/backups/san1/rsync/daily
> 00 19 * * 5 rsync -a /nas1/backups/rsync/daily /nas1/backups/rsync/weekly
> 01 00 1 * * tar -cjf /nas1/backups/san1/rsync/monthly/monthly-`date
> +%d.%m.%Y.`tar.bz2 /nas1/backups/san1/rsync/daily
>
> What I wanted to do was created a rotating backup system, backing up daily,
> writing the latest daily backup to a weekly folder once a week. Finally,
> once a month, write a backup to a tar.bz2 file to be written to tape.
> I'm still very much in the learning about Linux stage so I was hoping for a
> few pointers if possible. I suppose I should be change this a bit to write a
> log file, is it as easy as appending >> logfile.txt to the end of each line?
> Also, seeing as the backups take place internally is there any need to worry
> about encryption?
> Any suggestions gladly received.
> Thanks
> Simon
>
An educational note about stream redirection, the command:
command >>logfile.txt
Will only append stdout to the file, anything printed on stderr will be lost.
To capture both streams, the following command can be used:
command 2>&1>>logfile.txt
But as someone else mentioned, rsync has it's own logging option. The
man page is very helpful. :-)
--
Mat Booth
http://fedoraproject.org/get-fedora
More information about the Nottingham
mailing list