<br><br><div class="gmail_quote">On 2 June 2011 17:28, Chris Rowson <span dir="ltr"><<a href="mailto:christopherrowson@gmail.com">christopherrowson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've been tinkering with backups and backup rotation today and I have<br>
come across many wierd and wonderful backup scripts of varying<br>
complexity.<br>
<br>
Is there anything wrong with using something simple like this? (except<br>
of course for the lack of validation).<br>
<br>
Basically, let's delete anything over 7 days old and then make a new backup.<br>
<br>
Chris<br>
<br>
#!/bin/bash<br>
find /home/username/backup/*.tar.gz -mtime +7 -exec rm -f {} \;<br>
/bin/tar -cpzf /home/username/backup/`date<br>
+%a"-"%d"-"%b"-"%y"-"`backupfile.tar.gz /var/www<br>
<font color="#888888"><br></font></blockquote><div><br></div><div>Nope, that's fine for something simple. Half the world probably backs up like that ;)</div><div><br></div><div>s/</div></div><br>-- <br>Twitter: @sfgreenwood<div>
"Is this your sanderling?"<br></div><br>