Automate the backup of my databases and files with cron
I want to automate the backup of my databases and files with cron.
Should I add the following lines to crontab ?
mysqldump -u root -pPASSWORD database_name | gzip > /home/backup/database_`date +%m-%d-%Y`.sql.gzsvn commit -m "Committing the working copy containing the database dump"
-
First of all, is this a good approach?
-
It is not clear how to specify the repository and the working copy with svn?
-
How can I run svn only when the mysqldump is done and not before ? Avoiding conflicts
1) If you insist on storing backups in subversion, then there is nothing wrong with this approach. It is strange, though.
2) You should keep a checkout around, place the dump into the working directory, and run svn update and svn add as appropriate before committing.
3) If you run the commands as shown from a shell script, there should be no overlap.
Check more discussion of this question.
Related posts:
Leave a comment
Recent Posts
- SCP transfer only modified files
- How can I automate clearing and resetting a Linux user’s home directory to a default?
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
Tags
active-directory
amazon-ec2
apache
apache2
backup
bash
centos
cisco
command-line
debian
dns
email
exchange
firewall
iis
iis7
iptables
linux
macosx
monitoring
mysql
networking
nginx
performance
permissions
php
postfix
raid
security
sql-server
sql-server-2005
sql-server-2008
ssh
ssl
ubuntu
unix
virtualization
vpn
webserver
windows
windows-7
windows-server-2003
windows-server-2008
windows-server-2008-r2
windows-xp





