Creation of backups
Nine creates daily backups of the databases in your On Demand database environment between 01:00 and 02:00. These backups are kept locally on the database server for 10 days (default configuration). Further, the backups are stored on a remote backup storage system for seven days.
The backups are stored in the
/home/dbadmin/backup directory. All backups are versioned in directories with the following time scheme (example, exact timestamp will vary):
The symbolic link
/home/dbadmin/backup/latest/ will take you to the latest backup.
In the folder
customer you will find the backups of all databases you have created. If you are only interested in the structure of a database, you will find it in the
Create additional backups
You can create additional backups by calling the script
nine-postgresql-backup with the sudo command:
dbadmin@managedvirtualmachine-xxxxxxx:~ $ sudo nine-postgresql-backup 2022-11-18T09:54:19+01:00 Dumped and compressed database 'frontend_production' in 53 seconds 2022-11-18T09:55:04+01:00 Dumped and compressed database 'frontend_staging' in 45 seconds
Storage requirements of the backups
The backup routine creates compressed backups. Depending on the size of the database, this may still result in backups that require a lot of disk space.
To ensure that sufficient disk space is always available, the On Demand database environments have a mechanism that automatically monitors and performs a disk space expansion if required.
Number of backups kept
The number of backups kept can be adjusted via Cockpit. The duration of the retention period can be freely selected between one and 365 days.
Please note that a long retention period requires more storage space, which may result in additional costs.
If you create backups of your databases yourself, or do not want backups to be created for other reasons, the backup retention time can be adjusted to “0” in Cockpit.
In this case, the creation of further backups is deactivated. All backups already created will be deleted shortly after the adjustment.
Access to the created backups
Using the system user
dbadmin you can access the created backups via an SSH connection.
SSH access for the user is controlled by storing an SSH key in Cockpit.
Restoring and working with the created backups
The backup routine used is the same as the one we use for our managed servers. We have described how to work with the backups as well as more information about restoring backups in the following support article: