BackupPC-users

Re: [BackupPC-users] Only Backup last 7 days? (rsyncd)

2008-08-26 20:45:02
Subject: Re: [BackupPC-users] Only Backup last 7 days? (rsyncd)
From: Adam Goryachev <mailinglists AT websitemanagers.com DOT au>
To: BackupPC User List <BackupPC-users AT lists.sourceforge DOT net>
Date: Wed, 27 Aug 2008 10:44:52 +1000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

B. Cook wrote:
> On Aug 26, 2008, at 12:20 PM, B. Cook wrote:
> 
>> I have a Win2k3 server with Delta Copy running on it.
>>
>> There is an automated task that dumps the sql db located on that
>> machine to a file:
>>
>> rsync -avz caass::MSSql
>>
>> receiving file list ... done
>> drwx------           0 2008/08/26 02:00:01 .
>> -rwx------   519455232 2008/08/22 02:00:25 CAASS8_db_200808220200.BAK
>> -rwx------   519505408 2008/08/23 02:00:22 CAASS8_db_200808230200.BAK
>> -rwx------   519462400 2008/08/24 02:00:20 CAASS8_db_200808240200.BAK
>> -rwx------   519505408 2008/08/25 02:00:26 CAASS8_db_200808250200.BAK
>> -rwx------   519456256 2008/08/26 02:00:25 CAASS8_db_200808260200.BAK
>>
>> These seem to compress down to a about 135M (with bzip2)
>>
>> Is there someway that I could only keep the last 7 or so of these?
>> Should I compress them on the server first?.. etc.
>>
>> afict there is something with mtime and --files-from, but they all
>> look like it's running that command on the rsyncd server, which in
>> this case is Win2k3.
>>
>> Any suggestions?
>>
> 
> Found this type of answer..
> 
> C:\WINDOWS\system32\forfiles.exe /P "D:\Program Files\Microsoft SQL  
> Server\MSSQL\BACKUP" /D -7 /C "CMD /C DEL @FILE"
> 
> Make an automated task on the server that will delete files older than  
> 7 days on the server..
> 
> So I didn't get it via rsync or backuppc.. but got it to work none the  
> less..

I had an almost identical issue (sql dumps being backed up by rsyncd on
a windows server. My requirement was slightly different (I didn't want
to transfer the full file each day across the remote link).

I first added compression by tunneling rsyncd over ssh tunnel (This
requires a linux box on the remote LAN with the windows server being
backed up, if anyone wants details let me know, but I found the howto
from the net).

Then I had to find a way to rename the files that come out of the sql
dump program to always have the same filename.... so on the windows
machine, I configured to only keep one days worth of backups, then I
installed cygwin and used a bash script to rename the files so they did
not contain the date/time stamp. This way, backuppc sees the same
filename, with different content, so the rsync protocol only copies the
differences between the two files instead of the entire file.

If I need to restore, then I either use the latest copy which is always
local on the windows server, or else I restore the file from the
backuppc server to the windows server first... My backuppc then has it's
usual keep a month of daily plus 3 months of weekly and 12 months of
monthly backups.....

If anyone wants any of my scripts/configs, let me know and I'll post them...

Regards,
Adam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItKOEGyoxogrTyiURAs+IAKCLX+WQjRs8nmd86zXZkerY0tcXpQCgoKmu
IbfFMx8Lnl4y2MuLpZKfVto=
=GuYy
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/