UDS Enterprise needs a Data Base (DB) to store statistics, configuration data and system status in order to work properly. The DB must be available when UDS Server configuration is made. We must indicate the following data:
UDS Enterprise currently supports MySQL DB in its 5.x. version.
UDS Enterprise DB Backup
The first step to perform UDS Enterprise DB backup is to identify the instance UDS Enterprise is running on. If you are using the virtual appliance provided by VirtuaCable, the default instance will be called “uds”.
Once the DB instance UDS Enterprise is connected to is identified, we will need a user and password with administration rights on that DB.
If you are using the virtual appliance provided by VirtuaCable, the default user and password created for the uds instance are:
Once these data are collected, we will be ready to perform a backup of UDS Enterprise DB.
To perform DB backup we will execute the following command: mysqldump –u usuario –ppassword –-databases instancia > /ruta/nombre_dump.sql
It is posible to schedule backups to run automatically. The following example shows how to automate backup tasks using cron.
To perform a daily backup, e.g. at 3: 30 am, in gzip format and with the date of the day the backup is performed, you must edit the /etc/crontab file and add the following line: 30 3 * * * root mysqldump –u uds –puds –databases uds | gzip > /home/uds/$(date +%Y%m%d).sql.gz
Tools for logs rotations (for example logrotate) or configure DB backups to be located in an external storage, to avoid running out of space on the MySQL server, may also be very useful.
UDS Enterprise DB Restore
In order to perform a restore of the UDS Enterprise DB we must have the backup file chosen for this purpose. Once we have it located in the MySQL server, we will need the data of the DB instance which we want to recover the backup(instance name, username and password).
Once these data are collected, we will be ready to perform a restore of UDS Enterprise DB.
To perform DB restore we will execute the following command: mysqldump –u usuario –ppassword –-databases instancia < /ruta/nombre_dump.sql