[BlueOnyx:21317] Re: retention with automated backup
Richard Barker
admin at probass.com
Thu Aug 31 08:57:47 -05 2017
Yes you can add these two files end.sh and start.sh in the
/home/solarspeed/solbackup/server_backup/plugins/
end.sh
#!/bin/sh
WORKDIR=/home/solarspeed/solbackup/server_backup/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
start.sh
#!/bin/sh
WORKDIR=/home/solarspeed/solbackup/server_backup/data
TOBEREMOVED="$WORKDIR-$(date --date='7 days ago' +%F-%A)"
rm -rf $TOBEREMOVED
--
/*Richard C. Barker Sr.
CEO & President
1-813-873-8942
ProBass Networks Inc. */
www.probassnetworks.net <http://www.probassnetworks.net>
www.probass.net <http://www.probass.net>
***************************************
DISCLAIMER : -
This e-mail is confidential and intended only for the use
of the individual or entity named above and may contain
information that is privileged. If you are not the intended
recipient, you are notified that any dissemination, distribution
or copying of this e-mail is strictly prohibited. If you have
received this email in error, please notify us immediately
by return email or telephone and destroy the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20170831/e02b2509/attachment.html>
More information about the Blueonyx
mailing list