Cancel
Start searching
This search is based on elasticsearch and can look through several thousand pages in miliseconds.
Learn moreTo activate a daily backup of your MySQL or MariaDB databases, please first allow your vproXXXX user read access to all databases. To do this, call Mysql as the root user with the password you know and then execute the corresponding grant statement:
root@vpro0209:~ # mysql -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
[...]
MariaDB [(none)]> grant select, show databases, show view on *.* to 'vpro0209'@'localhost' identified by 'SICHERES-PASSWORT';
Then create a MySQL configuration file as user vproXXXX to allow access from the nightly job without having to enter the password:
[vpro0209@vpro0209:~]$ touch .my.cnf
chmod 600 .my.cnf
Write the following content to this file:
[client]
password=SECURE-PASSWORD
We recommend randomly selecting 20-30 characters for the password, e.g. with
[vpro0209@vpro0209:~]$ pwgen 30 1
asheeNeet8OoWee7suso6VeetheeSh
You can now activate the daily backup. To do this, create the file /etc/periodic.conf.local and add these variables:
daily_mysql_backup_enable="YES" # Enable daily backups
daily_mysql_backup_user="vproXXXX" # Mandatory local vproXXXX user
daily_mysql_backup_dir="/var/backups/mysql" # Optional backup directory - default: /var/backups/mysql
daily_mysql_backup_days="7" # Optional number of days backups are kept - default: 7
If you want to activate the backup on an existing virtual proServer that was originally delivered without this function, one more step is necessary:
[vpro0209@vpro0209:~]$ sudo cp /usr/local/etc-sample/periodic/daily/801.mysql /usr/local/etc/periodic/daily/
That's it already. Our script will now take care of everything else for you.