• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1511
  • Last Modified:

Webmin on Ubunu 9.10, How do I schedule a weekly backup with the MYSQL database? though webmin?

I'm running an Ubuntu Desktop 9.10 as my webserver, it has Webmin installed.

How can I:

1. Backup the entire MYSQL database to a file.
2. Backup everything including that mysql database to a backup drive I have located at:

/media/Backup


thanks for the help!

Does backintime work with Ubuntu 9.10 and Webmin?
0
www_puertoricoautoforo_com
Asked:
www_puertoricoautoforo_com
1 Solution
 
nasdron3Commented:
1) MySQL backup
In Webmin, go to Servers -> MySQL Database Server -> Backup Databases
- Select a backup directory
- Select "Other backup options" (Bzip2, for instance, is convenient)
in "Backup Schedule":
- Scheduled backup enabled ? YES, at times chosen below...
- select "Times and dates selected below..."
for a daily backup, select:
- Minutes: selected -> 0
- Hours: selected -> 2 (for a backup starting at 02:00)
- Days: All
- Months: All
- Weekdays: All
Then click on "Save".

You can then check your crontab to see if a new line has been added:
Into SSH, type:
crontab -l

you will get a line like this:
0 2 * * * /etc/webmin/mysql/backup.pl --all

2) Copy backup files to another directory
- Create a batch file named "copysql" in /root directory, containing:

mkdir /media/Backup
cp /home/backups/mysql/* /media/Backup

- set execute rights to the newly created batch file:
sudo chmod +x /root/copysql

- edit your crontab, using the following command:
sudo crontab -e

- add the following line:
0 3 * * * /root/copysql
(so that your batch file will be run at 03:00 every day)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now