The Automatic Database Backup module for Odoo 18 is an essential tool designed to streamline and automate the critical process of backing up your Odoo databases. This robust module provides unparalleled flexibility by supporting a wide array of storage locations, ensuring your data is secure and readily accessible. Users can choose to store their backups on local servers, remote servers, or leverage popular and secure cloud storage services such as Google Drive, Dropbox, OneDrive, Nextcloud, and Amazon S3. This comprehensive approach to data protection helps businesses mitigate the risks associated with data loss and ensures business continuity.

Key Features

  • Automated Backups: Schedule regular and reliable backups of your Odoo databases, ensuring continuous data safety and eliminating the need for manual intervention. This proactive approach safeguards your vital business information.
  • Redundancy Management: Efficiently manage your storage space by configuring the module to automatically remove outdated backups. This feature prevents unnecessary disk space consumption and maintains an optimized backup repository.
  • Real-time Notifications: Stay informed with immediate alerts regarding the success or failure of backup operations. These notifications provide critical insights into your data protection status, allowing for prompt action if issues arise.
  • Flexible Storage Options: Benefit from a wide selection of backup destinations, including local servers, remote servers, and leading cloud platforms like Google Drive, Dropbox, OneDrive, Nextcloud, and Amazon S3. This versatility ensures you can choose the most suitable and secure option for your organization.
  • Customizable Backup Frequency: Define precisely how often your backups should run. Options include daily, weekly, or monthly schedules, giving you granular control over your data retention strategy.

Setting Up the Automatic Database Backup Module

To ensure the seamless operation of the Automatic Database Backup module, a few preparatory steps are required. Follow these instructions carefully to set up the module within your Odoo environment.

1. Installation of External Dependencies

Prior to installing the Odoo module, it is crucial to install several external Python packages that facilitate communication with various cloud storage services. Open your terminal or command prompt and execute the following commands:

pip install dropbox
pip install pyncclient
pip install nextcloud-api-wrapper
pip install boto3
pip install paramiko

These packages enable the module to interact with services like Dropbox, Nextcloud, Amazon S3, and for secure connections via SFTP.

2. Module Installation

Once all the external dependencies have been successfully installed, you can proceed with the installation of the Automatic Database Backup module within your Odoo instance. Navigate to the Apps menu, search for the module, and click "Install".

How to Manage Automatic Database Backup in Odoo 18-cybrosys

This step integrates the module's functionalities into your Odoo system, making the backup configuration options available.

3. Module Configuration

After installation, the next crucial step is to configure the backup settings according to your organizational needs. This involves defining various parameters such as the target database, storage destination, and frequency.

a. Access Backup Configuration

To begin, navigate within your Odoo interface to Settings > Technical > Backup Configuration. This section serves as the central hub for managing all your backup preferences and settings.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

b. Create a New Backup Configuration

Click on the "Create" button to define a new backup job. You will be prompted to fill in several essential details to customize your backup process:

  • Database Name: Enter the exact name of the Odoo database you intend to back up.
  • Master Password: Provide the master password associated with your Odoo instance. This is required for secure access to the database for backup operations.
  • Backup Destination: Select your desired location for storing the backups from the available options (e.g., Local Storage, FTP, Google Drive).
  • Backup Directory Path: If storing locally or on a remote server, specify the absolute path to the directory where the backup files will reside. The system will automatically create this directory if it does not already exist.
  • Backup Frequency: Determine how often the backup process should execute. You can choose between daily, weekly, or monthly intervals to align with your data retention policies.
  • Notify User: Activate this option and select a specific Odoo user to receive email notifications. This user will be alerted upon both successful backup completion and any failures, ensuring immediate awareness.
  • Remove Old Backups: Enable the auto-removal feature to manage storage space efficiently. Specify the number of days after which old backup files should be automatically deleted.
  • Backup Format: Choose the format in which your database backup should be stored, either as a compressed ZIP file or a standard database dump.

Configuring Backup to Different Destinations

The Automatic Database Backup module offers extensive compatibility with a variety of storage services, providing flexibility to choose the most appropriate solution for your infrastructure. This section outlines the specific configuration steps for each supported platform.

Local Server

Configuring backups to a local server is straightforward. When setting up a new backup configuration, simply select "Local Storage" as your preferred backup destination. Then, provide the full directory path to the desired location on your local server where the backup files should be saved. The system will handle the storage of your Odoo database backups directly within that specified directory.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

FTP Server

For organizations utilizing FTP servers, the module allows for secure transfer of backup files. To configure backups to an FTP server, follow these steps:

  • Select FTP as the primary backup destination in your configuration.
  • Enter the required FTP connection details: the FTP Host (server address), Port (typically 21 for FTP), User (username for FTP access), and the corresponding Password.
  • Specify the FTP Path, which is the exact directory on the FTP server where you wish your Odoo backups to be stored.
  • It is highly recommended to click the "Test Connection" button to verify that all credentials and paths are correctly configured and that a connection can be established successfully.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

SFTP Server

For enhanced security over unsecured networks, configuring backups to an SFTP (SSH File Transfer Protocol) server is an excellent choice. The process is similar to FTP but uses a secure channel:

  • Choose SFTP as the backup destination in your Odoo configuration.
  • Input the SFTP Host address, the appropriate Port (commonly 22 for SFTP), your User credentials, and the corresponding Password for server access.
  • Define the SFTP Path, specifying the remote directory where the backup files will be securely stored.
  • Always utilize the "Test Connection" feature to confirm that the SFTP server can be reached and authenticated successfully, ensuring reliable backup operations.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Google Drive

Leveraging Google Drive for Odoo database backups provides a highly reliable and scalable cloud storage solution. The integration requires setting up a Google API project and configuring credentials:

Step 1: Create a Google API Project

  • Log in to the Google Cloud Console and initiate the creation of a new project. This project will house the necessary API services and credentials for Google Drive integration.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Once the project is created, proceed to enable the Google Drive API within the project's dashboard. This grants your application the necessary permissions to interact with Google Drive.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 2: Create Credentials

  • From your project dashboard, navigate to the "APIs & Services" section and select "Credentials."

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Ensure that the Google Drive API is indeed enabled, as shown.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Under the Credentials tab, click on "Create Credentials" and choose "OAuth client ID." This type of credential is used for applications that need to access user data.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 3: Configure Authorized Redirect URI

  • When creating the OAuth Client ID, select "Web application" as the application type.
  • In the "Authorized JavaScript Origins" field, add the base URL of your Odoo instance.
  • Crucially, for "Authorized Redirect URIs," input your Odoo URL followed by /google_drive/authentication. This URI is where Google will redirect after a successful authentication, allowing Odoo to capture the necessary tokens.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Upon completing these settings, a unique Client ID and Client Secret will be generated. Make sure to securely copy these values, as they are essential for configuring Odoo.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Finally, navigate to the OAuth consent screen. Under the "Test Users" section, add the email address of the Odoo user who will be authenticating with Google Drive. Alternatively, you can complete the app publishing process for broader access.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 4: Configure Odoo Backup Settings

  • Within your Odoo Backup Configuration, select Google Drive as the backup destination.
  • Paste the copied Client ID and Client Secret into their respective fields.
  • Locate the Google Drive folder where you intend to store your backups and extract its unique ID from the folder's URL in your browser. Enter this Drive Folder ID into Odoo.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • After entering the credentials, click the "Setup Token" button. This action will redirect you to Google's authorization page to grant Odoo access to your Google Drive.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Review the permissions requested by Odoo and click "Grant access" or "Continue" to finalize the authorization.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Once the authorization token is successfully generated and received by Odoo, your database backups will begin uploading to the specified Google Drive folder according to your defined schedule.
  • A "Reset Token" button will become available, allowing you to refresh the authentication token if it expires or if you need to re-authenticate for any reason.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Dropbox

Integrating with Dropbox provides another robust cloud storage option for your Odoo database backups. To establish this connection, you will need to generate an App Key and Secret Key from the Dropbox Developers App Console:

Step 1: Create a New App

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 2: Retrieve App Key and Secret

  • Upon successful creation of your app, the Dropbox console will provide you with a unique App Key and App Secret. These credentials are vital for authenticating your Odoo module with Dropbox.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 3: Set Permissions

  • Carefully select the necessary permissions for your application within the Dropbox settings. Ensure that the app has sufficient access to read and write files to your Dropbox account, then click "Submit" to save these changes.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 4: Configure Backup in Odoo

  • In your Odoo instance, go to Backup Configuration and select Dropbox as the desired backup destination.
  • Enter the App Key and App Secret obtained from the Dropbox Developers Console.
  • Specify the Dropbox Folder Name where your backups will be stored. This should correspond to a folder within your Dropbox account.
  • Click on "Setup Token" to initiate the token generation process.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 5: Get the Authorization Code

  • A new window or prompt will appear with a button labeled "Get Authorization Code". Click this button, which will direct you to Dropbox to authorize your app. Copy the authorization code provided by Dropbox and paste it into the "Dropbox Authorization Code" field in the Odoo wizard.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 6: Reset Refresh Token (If Required)

  • Should the authentication token expire or if you need to re-establish the connection, a "Reset Token" button will be available. Clicking this will allow you to refresh the authentication token and re-authorize the connection to Dropbox.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

OneDrive

For users who prefer Microsoft's cloud storage, OneDrive integration allows for efficient and secure backup of your Odoo databases. The setup involves registering an application in the Microsoft Azure Portal:

Step 1: Register a New App in Microsoft Azure

  • Access the Microsoft Azure Portal and proceed to register a new application.
  • During the registration process, configure the "Redirect URI" by entering your Odoo database URI followed by /onedrive/authentication. This is essential for the authentication flow. For example: https://your-odoo-instance.com/onedrive/authentication.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 2: Obtain Credentials

  • After registration, copy the generated Client ID from your registered app's overview.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Next, navigate to the "Certificates & secrets" section to generate a new Client Secret. Ensure you copy this secret immediately upon generation, as it will not be visible again.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 3: Set Permissions

  • In the "API permissions" or "Expose an API" section of your Azure app registration, add the following delegated permissions (scopes) to allow your app to interact with OneDrive effectively:
  1. Offline_access: Allows the application to maintain access to resources on behalf of the user, even when the user is not actively using the application.
  2. openid: Allows users to sign in to the application with their Microsoft account.
  3. Files.ReadWrite.All: Grants full read and write access to all files the user can access.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 4: Retrieve OneDrive Folder ID

  • Identify the specific folder in your OneDrive where you wish to store the Odoo backups. Copy the unique Folder ID from the URL of that folder in your web browser. This ID is crucial for directing backups to the correct location.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 5: Configure Backup in Odoo

  • Within the Odoo Backup Configuration settings, select OneDrive as the preferred backup destination.
  • Input the obtained App Key (Client ID), App Secret (Client Secret), and the OneDrive Folder ID into the corresponding fields.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 6: Authenticate & Generate Token

  • Click on the "Setup Token" button within Odoo. This action will initiate the authentication process, redirecting you to a Microsoft authorization page.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • On the authorization page, review the permissions and grant the necessary access for Odoo to interact with your OneDrive. Once authorized, the module will generate and utilize an authentication token to store your backups.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Nextcloud

Nextcloud offers a self-hosted cloud storage solution, providing greater control over your data. Configuring Odoo backups to Nextcloud ensures your data remains within your sovereign infrastructure:

Step 1: Create a Nextcloud Account

  • If you don't already have one, visit the Nextcloud Sign-Up page or set up your own Nextcloud instance.
  • Provide your email address and complete the sign-up process.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 2: Log in to Nextcloud

  • After successfully signing up or if you already have an account, navigate to the Nextcloud login page.
  • Enter your registered email and password to access your Nextcloud account dashboard.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 3: Retrieve Your Nextcloud Domain

  • Within your Nextcloud account, go to the "Settings" section.
  • Look for "Mobile & Desktop" or similar connection settings.
  • Locate the "Server Address" or "WebDAV URL," copy this link, and paste it into the "Domain Name" field in your Odoo backup configuration. This URL acts as the endpoint for Odoo to connect to your Nextcloud instance.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 4: Configure Backup in Odoo

  • In Odoo's Backup Configuration, select Nextcloud as your chosen backup destination.
  • Populate the following critical fields:
  1. Domain Name: The server address you retrieved in Step 3.
  2. Username: Your Nextcloud login username.
  3. Password: Your Nextcloud login password.
  4. Folder Name: The specific folder within your Nextcloud instance where you want the backup files to be stored.
Finally, click the "Test Connection" button to verify that Odoo can successfully connect to your Nextcloud server with the provided credentials.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Upon successful configuration, your Odoo database backups will be generated and stored in the specified Nextcloud folder according to the defined backup frequency.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Amazon S3

Amazon S3 (Simple Storage Service) is a highly scalable, durable, and secure object storage service from AWS, making it an excellent choice for robust Odoo database backups. Here’s how to configure it:

Step 1: Create an Amazon S3 Account

  • Begin by visiting the Amazon S3 Sign-Up page and complete the account creation process. If you already have an AWS account, you can skip this step.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 2: Generate Access Keys

  • Once your AWS account is set up, navigate to the "Account Security Credentials" section within the AWS Management Console.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Proceed to the "Access keys (access key ID and secret access key)" tab and click on "Create New Access Key".

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Carefully copy both the generated Access Key ID and Secret Access Key. These credentials are crucial for Odoo to authenticate with your S3 account and should be stored securely.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 3: Create an S3 Bucket

  • From the AWS Management Console, click on "Services" (usually located in the top-right corner) and then navigate to "Storage" and select "S3".

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Click the "Create bucket" button to set up a new storage container for your backups.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Provide a unique and compliant bucket name, and select the AWS region where you wish your backups to be physically stored. Consider data residency requirements when choosing a region.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

  • Finalize the setup by clicking "Create bucket". Your new S3 bucket will then appear in your list of buckets, ready to receive backups.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 4: Configure Backup in Odoo

  • Within the Odoo Backup Configuration interface, choose Amazon S3 as your backup destination.
  • Enter the following details that you obtained in the previous steps:
  1. Amazon S3 Access Key: The Access Key ID.
  2. Amazon S3 Secret Key: The Secret Access Key.
  3. Bucket Name: The exact name of the S3 bucket you created in Step 3.
  4. File Name: Specify a folder name (or prefix) within your S3 bucket where the backup files will be organized.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Step 5: Test Connection

  • Crucially, click on the "Test Connection" button to verify that Odoo can successfully connect to your Amazon S3 bucket using the provided credentials. This ensures your backup configuration is sound.

Efficient Storage Management: Automatically Remove Old Backups

A key feature of the Automatic Database Backup module is its ability to manage storage space effectively through automated old backup removal. By enabling the "Remove Old Backups" option during configuration, you can specify a retention period in days. Once this period is exceeded, older backup files will be automatically deleted from your chosen storage destination.

This intelligent feature is vital for optimizing storage utilization, preventing the accumulation of redundant data, and ensuring that your backup repository remains organized and contains only the most relevant recovery points. It contributes significantly to cost-efficiency, especially with cloud storage, and simplifies compliance with data retention policies.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Real-time Alerts: Notify Users of Backup Status

Maintaining awareness of your backup operations is crucial for data integrity and disaster recovery planning. The Automatic Database Backup module includes a comprehensive notification system that keeps designated users informed about the status of each backup job.

By activating the "Notify User" option within the backup configuration and selecting a specific Odoo user, that individual will receive immediate email alerts. These notifications are sent for both successful backup completions and any instances of backup failure, providing real-time visibility into your data protection processes.

This feature empowers administrators to monitor backup health proactively and enables prompt intervention in the event of an issue, ensuring that critical data is always protected.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Successful Backup Notification Email:

An example of a successful backup notification email is shown below, confirming that the backup operation was completed without issues.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Failed Backup Notification Email:

In case of a backup failure, an alert email similar to this example will be sent, detailing the error and prompting immediate investigation.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Scheduled Actions for Automated Database Backup Execution

The Automatic Database Backup module integrates seamlessly with Odoo's scheduled actions framework, allowing for precise control over backup execution intervals. Based on your chosen backup frequency during configuration, the module will leverage three distinct scheduled actions:

  • Daily Backup: This action runs every day, ensuring that your Odoo database has the most up-to-date recovery points. Ideal for dynamic environments with frequent data changes.
  • Weekly Backup: Executed once a week, this provides periodic data protection, balancing freshness with storage efficiency for less critical daily changes.
  • Monthly Backup: This action runs once a month, serving as a robust solution for long-term data retention and archival purposes.

To ensure reliable and fully automated data protection, it is essential to enable the appropriate scheduled action that aligns with the backup frequency you defined in your module configuration. This activation ensures that backups are consistently executed without manual intervention.

You can manage these scheduled actions by navigating to Settings > Technical > Automation > Scheduled Actions. Here, you can select the scheduled action corresponding to your desired frequency (e.g., "Daily Odoo Backup").

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Once selected, ensure the scheduled action is activated to run automatically. You also have the option to click 'Run Manually' if you need to trigger an immediate backup for testing or ad-hoc purposes.

How to Manage Automatic Database Backup in Odoo 18-cybrosys

Conclusion

The Automatic Database Backup module for Odoo 18 stands out as an indispensable tool for businesses aiming to achieve seamless, reliable, and secure data management. By comprehensively automating the entire backup process across a diverse range of storage destinations, it offers unparalleled flexibility and peace of mind.

With robust support for various storage solutions—including local servers, remote FTP/SFTP servers, and leading cloud services such as Google Drive, Dropbox, OneDrive, Nextcloud, and Amazon S3—organizations can strategically safeguard their critical Odoo data according to their specific infrastructure and compliance requirements. This versatility ensures that businesses of all sizes can implement an effective data protection strategy.

Beyond just saving data, this module significantly enhances overall data security, optimizes storage utilization through intelligent old backup removal, and bolsters disaster recovery readiness. Its core capabilities, including customizable scheduled backups (daily, weekly, and monthly), automated data lifecycle management, and real-time email notifications, empower administrators with continuous oversight and control.

Ultimately, this feature-rich solution ensures that your Odoo database remains consistently protected, effectively minimizing the risks of data loss, operational disruptions, and costly downtime. By implementing this module, businesses can gain confidence in their data's integrity, knowing that their backups are automated, securely stored, and readily available whenever recovery is needed, allowing them to focus on core business operations with assurance.

Was this answer helpful? 0 Users Found This Useful (0 Votes)