This Automatic Database Backup module makes it easier to create automatic database backups periodically. The created backups can be kept on a local drive, an FTP server, an SFTP server, a dropbox account, a Google Drive account, or a OneDrive account. The ability to automatically discard outdated backups can be enabled by the user. Users have the option to opt-in to email alerts for successful or unsuccessful backup generation and storage. Users can create and store database backups in numerous locations by using the Automatic Database Backup module.
Dropbox is a third-party Python dependency used by this module. Install the Python package first, then the module. The following command can be used to install the necessary Python package:
pip install dropbox
The main features of this App
1. Generate Database Backups at regular intervals
2. Generated backup can be stored on Google Drive
3. Store Backup to Remote Server
4. Store Backup to Dropbox
5. Store Backup to Onedrive
6. Automatically remove old backups
7. Notify the user of the success and failure of backup generation
Let’s see how to configure the App:
Step 1: First, Install Odoo 16 Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox, and Onedrive Module
Download the app from the Odoo store using the link above and install it.
Odoo App Link Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox and Onedrive,
Database Backup Configuration Menu:
Goto Setting - Technical - Backup Configuration to configure backups
Create New Database Backup Configuration
Enter the Database name and Master Password. Indicate the backup's destination and kind. Enter the location of your backup directory; if one doesn't already exist, a new directory will be created. And we can also select the Backup in Zip or Dumb format.
Store Backup to Remote SFTP Server
Enter credentials and choose SFTP as the backup destination. To determine whether the connection is successful, click the Test Connection option.
Store Backup to Remote FTP Server
Enter credentials and choose FTP as the backup destination. To determine whether the connection is successful, click the Test Connection option.
Store Backup to Google Drive
You must activate the Google Drive API and start a new Google API project in order to save backups in Google Drive. Log in to your Google API Console account. When constructing the project, copy the URI of your Odoo database followed by /google_drive/authentication for the Redirect URI limitations. Example:
Enable Google Drive API
Establish credentials, When prompted to choose an application type, choose website application.
Click + Add URI in the Authorized JavaScript Origins box and enter the Odoo URL for your business. Click + Add URI in the Authorized redirect URIs box, then enter the URL for your company's Odoo system, followed by the phrase "/google_drive/authentication." Once each step has been finished, You will be issued a client ID and secret; copy the credentials.
Create a backup. Paste the Client ID and Client Secret from the Google Drive API Credentials page into the relevant fields.
Setup Tokens, a page for authorizing transactions will be displayed.
Reset the token if required.
Store Backup to Dropbox
Choose Dropbox as that of the backup destination. Enter the app secret and key. A new app must be registered in the App Console. Choose the Dropbox API app and the permissions for your application (files.content.write and files.content.read permissions required).
Install the Dropbox library for Python (pip instal dropbox).
Create a refresh token.
Click confirm after getting the authorization code.
If necessary, reset the refresh token.
Store Backup to Onedrive
Choose OneDrive as the backup location. Enter the App secret and App key. A new app must be registered on the Microsoft Azure site. Create a backup. Paste the Client ID and Client Secret from the Google Drive API Credentials page into the relevant fields. Example:
Copy the Client ID
Generate Client Secrets.
Find the one drive folder ID for the backup file storage location.
Configure the backup
Setup Tokens, a page for authorizing transactions will be displayed.
If necessary, reset the token.
Automatically Remove Old Backups
Set the amount of days to delete backups and enable the auto-remove option.
Notify the User of the Success and Failure of Backup Generation
Select a user to inform by turning on the option to notify users. When a backup is successful or unsuccessful, the specified user will get an email.
a successful email backup notice
email notification of backup creation failure
Scheduled Action For Generating Backup
Set the execution interval and enable the scheduled operation "Automatic database backup." Backups will be created on a regular basis in accordance with the arrangement for the planned activity.
The Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox, and Onedrive App for Odoo-16 functionalities have all been covered in this article. I hope you all comprehend how it should function.