[ubuntu-za] MySQL backup

Alfred Charles Stockton alf at devacs.za.net
Mon Oct 12 10:58:30 UTC 2015


I would use anacron rather than cron just in case system is down when cron
is supposed to execute dackup.Unless, of course, Zambian electricity is
more reliable than Eskom.
I would use the date and time as part of the backup name and then you can
have a script, running from anacron again, that deletes backups older than
a particular date.
> Hi Guys
>
> Sorry for asking for this on the list, but I'm in Zambia again and only
> only have access to email (no Internet access).  Otherwise I would have
> searched for a solution myself.
>
> I have an Ubuntu 14.04 server running a MySQL server for which I want to
> do daily backups.  The server is only busy from 6am to about 10pm.  So
> I'm considering a simple cron job that runs mysqldump  at midnight.  But
> I have a few questions:
>
> a. Is this a good way to do it?  Or is there something beter?
>
> b. If I use cron:
>    b.1 how do I generate unique file names for the backups?
>           e.g. [db_name][date]
>    b.2 how do I delete old versions so I don't fill up the hard drive?
>           e.g. keeping  only backups for two weeks, and once a month
> thereafter.
>
> Thanks
> Charl
>
> --
> ubuntu-za mailing list
> ubuntu-za at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-za
>


-- 
Regards,
Alf Stockton




More information about the ubuntu-za mailing list