Re: Backing up database...
Posted by: Michael DeLigny
Date: January 11, 2013 10:08PM

Scott Nemes Wrote:
-------------------------------------------------------
> Do you have shell access to the server? If so you
> can easily do this with a script that you call via
> cron.
>
> Below is an example bash script which uses "find"
> with "mtime" to locate and remove older backups.
> This is less precise than saying "keep exactly X
> number of backups" since it is based on time, but
> it will be similar as long as the backups are run
> at the same time each day.
>
>
> #!/bin/bash
>
> # prune backups
> find /var/backups -mtime +4 -exec rm {} \;
>
> mysqldump --all-databases --single-transaction |
> gzip > /var/backups/mysql_backup.`date
> +%Y%m%d`.gz
> done


Yes, I do have shell access and the hosting company also lets me enter a cron job via web page also. I just need to enter the command (which I guess would be the batch file) and then how often to run. I don't know any commands at all, so even the little simple commands you showed me I have no idea what they do. Maybe I'll try the commands and see how it works out. Thanks.

Options: ReplyQuote


Subject
Written By
Posted
January 10, 2013 11:55PM
January 11, 2013 10:55AM
Re: Backing up database...
January 11, 2013 10:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.