[Koha] Autodelete backups older than 5days

muiru james muirunyeri at gmail.com
Sun Dec 6 01:30:51 NZDT 2020


Hello

Thank you for finding time to reply to my question.
I have created a cron that runs at 1800hrs and executes a shell script i
have named badh.sh containg the syntax for doing a manual sql dump
(mysqldump -uroot -p**** /) which saves in the folder dropbox in the home
directory. This dropbox folder synchronises and uploads the new archives to
the cloud. I want to automatically delete the old backup files older than
five days thru a script which I'll add to the bash.sh script file.

Regards

On Sat, Dec 5, 2020, 14:18 Mark Alexander <marka at pobox.com> wrote:

> Excerpts from muiru james's message of 2020-12-05 13:10:56 +0300:
> > I have my Koha instance backing up automatically to dropbox through a
> bash
> > script. I need to automatically delete archives older than 5 days. How
> do I
> > do it?
>
> If you're using rsync to send the backups from your Koha server to
> dropbox, you can use the --delete option.  That will delete files on
> dropbox that are not present on the Koha server.  I don't use use dropbox,
> but I do something like this to copy backups to my home machine:
>
> rsync -av --delete root at koha.example.com:/var/spool/koha/INSTANCENAME/
> koha-backups
>
> --
> Let's organize this thing and take all
> the fun out of it. --Ashleigh Brilliant
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list