We us a shell script that calls a cronjob (root) at 3am daily. The line in the cronjob is: +ACo- 3 +ACo- +ACo- +ACo- /usr/local/bin/dbbakup.sh username password
The shell script: +ACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIw- +ACMAIQ-/bin/sh +ACM- +ACQ-1 +AD0- Unix/MySQL Username +ACM- +ACQ-2 +AD0- Unix/MySQL Password if +AFs- +ACE- -e /dbbakup +AF0- then mkdir /dbbakup fi mysqldump -u+ACQ-1 -p+ACQ-2 -c --add-drop-table --add-locks --flush-logs --databases account+AD4-/dbbakup/account.sql mysqldump -u+ACQ-1 -p+ACQ-2 -c --add-drop-table --add-locks --flush-logs --databases payroll+AD4-/dbbakup/payroll.sql mysqldump -u+ACQ-1 -p+ACQ-2 -c --add-drop-table --add-locks --flush-logs --databases contact+AD4-/dbbakup/contact.sql +ACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIwAjACMAIw- If you wanted to ftp the resulting scripts to another server, you could add code to the shell script to run ncftpput, etc. Gerald Jensen ----- Original Message ----- From: +ACI-Impex Holidays Maldives / Hasan+ACI- +ADw-hasan+AEA-impex.com.mv+AD4- To: +ADw-mysql+AEA-lists.mysql.com+AD4- Sent: Sunday, February 24, 2002 10:31 AM Subject: backup Hello everyone, I am trying to do backups using the crond daemon on my Linux server. Can I write a similar line as below on my crontab file. Any examples would be appreciated. mysqldump impex +AD4- siteroot/home/hasan/backup/backup.sql Alternatively i am thinking of running a perl file ...which will find access to the database and then do the backing and add this file to the crontab. Has anyone got a file pre-written for this purpose. thank you so much. Hasan --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail +ADw-mysql-thread100889+AEA-lists.mysql.com+AD4- To unsubscribe, e-mail +ADw-mysql-unsubscribe-autodata+AD0-execpc.com+AEA-lists.mysql.com+AD4- Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php