[BlueOnyx:21330] Re: retention with automated backup

PESJA A & A info at pesja.nl
Sun Sep 3 10:53:59 -05 2017


Hello Richard,
 
I did exactly what you wrote. Put a start.sh and a end.sh with the content into the plugins directory. But no luck.
Can you help me get on track?
 
Kind regards,
 
PESJA
 
 
 
Van: Blueonyx [mailto:blueonyx-bounces at mail.blueonyx.it] Namens Richard Barker
Verzonden: donderdag 31 augustus 2017 15:58
Aan: blueonyx at mail.blueonyx.it
Onderwerp: [BlueOnyx:21317] Re: retention with automated backup
 
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 
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/20170903/d35b5070/attachment.html>


More information about the Blueonyx mailing list