Yet another rsync incremental thread
Mac User FR
macuserfr at free.fr
Sat Jul 19 13:45:58 GMT 2008
Thanks Matt!! I'm always amazed of the quick and precise answers you
give!
Yes, sorry, I meant push (English isn't my native langage and I always
swap push and pull).
For rsnapshot, OK, I understood now how to connect them. The "post-
xfer exec" I was looking for don't exist on the rsync man page, but
on the rsyncd.conf which I've didn't look at (my fault :/ ). I think I
will not use rsnapshot because I don't like to use to many software
but only a small rotating script home made.
Didn't finished the script yet, but it will do something like this:
1) Expected first state:
backup (rsync transfer folder), lastest (previous transfer folder) and
<PCname><date> directories (old backup)
2) Execution of the script (pseudo code):
get date
get free disk space
get backup size
mv lastest -> <PCname><date>
mv backup -> lastest
while(free space < backup size) #disk almost full, need deleting some
old stuff
get oldest backup folder name
rm it
That's all. The only thing I haven't coded yet is the while loop, but
I will do it next week.
What could rsnapshot give me in addition to this? Would it manage free
space for many concurrent backups?
Using my script for 2 or more backups, if the other backup takes
almost all disk, it won't be smart enough to delete backups from the
other backup. There are some other cases I should care about. But I
still have the impression rsnapshot would be too big stuff for only
this need.
In another hand, don't you think we could add the content of this
script (revised, of course) to make rsync a complete incremental
backup solution without needing 3rd part software? Isn't a good idea?
Best regards,
Vitorio
Le 18 juil. 08 à 21:35, Matt McCutchen a écrit :
> On Fri, 2008-07-18 at 12:40 +0200, macuserfr wrote:
>> What's new? On my new job I have several servers to
>> administrate. Servers that aren't backed up (sic). So, there's why
>> I'm
>> back to rsync.
>>
>> The backup plan I would like:
>>
>> 1) Client side: PCs running rsync (or cwrsync with UTF-8 mod for long
>> names for windows ones). They run rsync (I don't need data encryption
>> so no need to ssh unless it's simpler) and pull data they want to the
>> backup server. This side is OK.
>
> I think you mean "push".
>
>> 2) Server side: A standard PC with FreeNAS FreeBSD distrib, RAID-1
>> disks and rsync server. Here I would like the backups to be
>> incremental and rotated, with a sort of time stamp. Here is where
>> things get complicated.
>
> Just use an rsync daemon wired up to an rsnapshot installation in
> sync_first mode, where the daemon module points to the .sync dir in
> the
> snapshot root and the "post-xfer exec" command calls "rsnapshot
> LOWEST-INTERVAL". You can use a listening daemon or a single-use
> daemon
> over ssh as you prefer. This is the approach I've been recommending
> for
> pushing hard-linked backups for a while; it achieves everything you
> want
> without modifying any of the tools. I helped Eric Johansson with a
> similar setup a while ago:
>
> http://lists.samba.org/archive/rsync/2007-December/019470.html
>
> If you have multiple clients pushing backups, it's simplest to have a
> separate module and snapshot root for each client. To keep things
> manageable, you can write a script to automatically generate the
> individual rsnapshot.conf files by substituting the necessary values
> into a template.
>
> Matt
More information about the rsync
mailing list