How to install and enable Database Backup/Restore add-on?
The Database Backup tool works with MySQL, MariaDB, Percona, PostgreSQL, and Redis databases in the AccuWeb.Cloud Application Platform. It collaborates with Backup Storage to let users automatically make and save backups of their databases in remote storage.
Important: Before updating (redeploying) the PostgreSQL instance, it is strongly advised to make a database backup. Check the official documentation for instructions on upgrading data using pg_dumpall and pg_upgrade.
Setting up Backup Storage for Add-On Installation
Before you begin installing the add-on, make sure to create a dedicated storage space to store all backup data.
Step 1: If you don’t already have dedicated storage, you can create it quickly using the Backup Storage package available in Marketplace.
Step 2: During installation, choose between Standalone and Cluster storage options. Specify the preferred Number of nodes (for the Cluster option) and Storage size. Provide standard data like Environment (domain name) and Display Name (alias).
Step 3: Click the Install button and wait for the storage to be created. It will be automatically added to the “Backup storage nodes” group.
Important Note: One storage can be used for multiple databases.
Step 4: You can install the backup add-on once the storage is ready. Hover over your database, click the Add-Ons icon, and select the Database Backup/Restore Add-On.
Step 5: Provide the following data:
Choose a scheduling option:
Pre-defined: Select from standard backup intervals (hourly, daily, weekly, monthly)
Custom: Choose exact Time, required Days of the week, and Time
Manual (crontab): Provide a simple cron-based expression (using the UTC zone) to schedule backups
Backup storage: Choose from the list of installed backup storage
Number of backups: Set the Number of newest backups to keep for the current database
Database User and Database Password: Provide user credentials to access the database
Step 6: You’ll see the installation success pop-up in a minute.
Your backup add-on is now active. Just wait for the specified Time for backups to be created.
Managing Add-Ons
After installing the add-on, you can do the following:
Backup Now: Immediately create a backup.
Configure: Adjust settings like schedule, storage location, Number of backups, and user credentials.
Restore: Bring back your database from a backup.
Uninstall: Remove the backup add-on.
When backing up, the system creates and stores a database snapshot in Backup Storage. The backup has its folder (named after the original database) and a unique name (timestamp). This helps keep backups organized, especially when dealing with multiple databases.
During the restore process, the storage server’s corresponding directory connects to the target database’s primary node. Then, the SQL dump from the needed backup snapshot is restored and applied to the database.
Important note:
-> All operations happen on the master node of the database layer.
-> For non-clustered databases with multiple nodes, restoration occurs on one node. In a primary-secondary setup, ensure the primary node of the cluster is the master node of the layer.
Restoring Database
Restoring a database from a backup replaces all existing data—permanently losing any recent changes made since the backup.
To restore a database, choose the Restore option in the add-on. A window will appear with these options:
Restore from: Choose the target environment (multiple options are available if using the backup add-on on several environments).
Backup: Choose from a list of backups for the selected Environment (names include timestamps for quick identification).
Click Restore and confirm in a pop-up. Once started, the action cannot be cancelled or undone.
After completing the process, you’ll see a success notification in the dashboard.
Conclusion:
In conclusion, installing and enabling the Database Backup/Restore add-on is crucial for keeping your data safe. First, create a dedicated storage space for your backups. Then, follow the simple steps to install the add-on, choose your backup settings, and let it do its job.
Remember, restoring a database replaces all existing data, so be careful and ensure you have the right backup selected. Once set up, your data will be protected, and you can restore it if needed. It’s an important tool for maintaining the security and integrity of your databases.