[BlueOnyx:19650] Re: Automated Server Backup
Maurice de Laat
mdlaat at muisnetwerken.nl
Fri Jun 3 11:18:27 -05 2016
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
More information about the Blueonyx
mailing list