(easy) backups [SOLVED]

Jerry Feldman gaf at blu.org
Sat Nov 7 11:29:50 EST 2009


On 11/07/2009 10:21 AM, Alan Johnson wrote:
> On Sat, Nov 7, 2009 at 8:08 AM, Jerry Feldman <gaf at blu.org
> <mailto:gaf at blu.org>> wrote:
>
>     Another backup system is rsnapshot. http://rsnapshot.org/
>
>     I used to do a simple rsync backup, but now I use this both at
>     home and
>     at work from a NAS device. The nice thing about this is that it
>     effectively does incrementals by using the --link-dest rsync flag, so
>     that the files in each backup set are hard linked, so you only get
>     those
>     files that have changed or have been added since the last backup.
>
>
> Because I'm too lazy to RTFM myself, does rsnapshot take care of
> clearing out older data to make room for new, or does that need to be
> handled separately?  I believe backkuppc takes care of that, if my
> memory serves, but again, it was pretty complicated to get going.
>
Yes.
It maintains 1 directory for each backup for instance:
drwxr-xr-x   3 root root  4096 2009-11-06 08:02 daily.0
drwxr-xr-x   3 root root  4096 2009-11-05 08:02 daily.1
drwxr-xr-x   3 root root  4096 2009-11-04 08:02 daily.2
drwxr-xr-x   3 root root  4096 2009-11-03 08:02 daily.3
drwxr-xr-x   3 root root  4096 2009-11-02 08:01 daily.4
drwxr-xr-x   3 root root  4096 2009-11-01 08:03 daily.5
drwxr-xr-x   3 root root  4096 2009-10-31 08:02 daily.6
drwxr-xr-x   3 root root  4096 2009-11-07 10:03 hourly.0
drwxr-xr-x   3 root root  4096 2009-11-07 08:03 hourly.1
drwxr-xr-x   3 root root  4096 2009-11-06 22:02 hourly.2
drwxr-xr-x   3 root root  4096 2009-11-06 18:01 hourly.3
drwxr-xr-x   3 root root  4096 2009-11-06 16:02 hourly.4
drwxr-xr-x   3 root root  4096 2009-11-06 14:02 hourly.5
drwxr-xr-x   3 root root  4096 2009-11-06 12:02 hourly.6
drwxr-xr-x   3 root root  4096 2009-09-27 12:03 monthly.0
drwxr-xr-x   3 root root  4096 2009-10-25 08:00 weekly.0
drwxr-xr-x   3 root root  4096 2009-10-18 08:02 weekly.1
drwxr-xr-x   3 root root  4096 2009-10-11 08:03 weekly.2
drwxr-xr-x   3 root root  4096 2009-10-04 08:01 weekly.3

remember there are not 19 copies of each file, there is only 1 copy of
each file that has not been changed. Also, when daily is run it first
removes the oldest daily and renames daily.[0-5] to daily.[1-6], then
renames the oldest hourly (hourly.6) to daily.0. So, the only actual
rsyncs are done on the hourly. Also note that the dates on the monthlies
are going to be over a month old because they are simply a renaming of
the latest daily. One thing I do on my company backup is to time the
daily, weekly and monthly so that the rename operations are done before
the rm. So, monthly will run before the weekly, and the weekly will run
before the daily ...
This is imporant at work since the NAS device is very slow and it takes
about 40 minutes to delete a directory, but at work we are talking about
500GB.
Example:
-rw-r--r--  19 root root    1001 2009-02-26 09:30 xinetd.conf

Note that this has 19 links. I'm probably doing an overkill but I am a
bit paranoid since I had a crash last year, and my backup was flawed. I
also have a lot of excluded files such as Firefox caches.


-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20091107/dd59ae4b/attachment.bin 


More information about the gnhlug-discuss mailing list