[BlueOnyx:19653] Re: Automated Server Backup

Colin Jack colin at mainline.co.uk
Fri Jun 3 12:26:46 -05 2016


Thanks for sharing - that is very useful.

Colin




On 03/06/2016, 17:18, "Blueonyx on behalf of Maurice de Laat" <blueonyx-bounces at mail.blueonyx.it on behalf of mdlaat at muisnetwerken.nl> wrote:

>
>On 03-06-16 14:56, Joachim Klein wrote:
>> On blueonyx I make backups with solbackup / raqbackup and transfer this
>> via ftp
>>
>> to this nas. Then with this I was possible to define a daily snapshot
>> and retain 5 or 6 Days.
>>
>
>Perhaps my 2 plugins for raqbackup can also be of use for anyone. These 
>plugins (to be placed in the plugin directory of raqbackup) rotate 7 
>days of backups, and saving only modified files. Files in the backup 
>that are not modified are being saved as a link.
>
>In both plugins, you might want to edit the path to WORKDIR
>
>------start.sh------
>#!/bin/sh
>
>WORKDIR=/home/raqbackup/data
>TOBEREMOVED="$WORKDIR-$(date --date='7 days ago' +%F-%A)"
>rm -rf $TOBEREMOVED
>------start.sh------
>
>------end.sh------
>#!/bin/sh
>
>WORKDIR=/home/raqbackup/data
>TODAY="$WORKDIR-$(date +%F-%A)"
>YESTERDAY="$WORKDIR-$(date --date='yesterday' +%F-%A)"
>
>mv $WORKDIR $TODAY
>
>for myfile in $YESTERDAY/*
>do
>   cmp $TODAY/${myfile##*/} $YESTERDAY/${myfile##*/} &> /dev/null
>   if [ $? -eq 0 ]         # Test exit status of "cmp" command.
>   then
>     ln -s -f $TODAY/${myfile##*/} $YESTERDAY/${myfile##*/}
>   fi
>done
>------end.sh------
>
>Kind regards
>-- 
>Maurice
>_______________________________________________
>Blueonyx mailing list
>Blueonyx at mail.blueonyx.it
>http://mail.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list