Automatic Database Backup To Local Server, Remote Server,Google Drive, Dropbox, Onedrive, Nextcloud and Amazon S3 Odoo17
by Cybrosys Techno Solutions https://www.cybrosys.comAvailability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 1502 |
Technical Name |
auto_database_backup |
License | LGPL-3 |
Website | https://www.cybrosys.com |
Versions | 12.0 13.0 14.0 15.0 16.0 17.0 18.0 |
Automatic Database Backup
This Module Helps To Generate Automated Backup Of Databases.
Generate automatic backup of databases and store to local, google drive, dropbox, nextcloud, amazon S3, onedrive or remote server, Odoo17


KEY HIGHLIGHTS

Automated Backup
Generate Database Backups on regular intervals.

Remove Redundancy
Automatically remove old backups that consumes storage space.

Notification
Notify user on success and failure of backup generation.

Flexibility of Backup
Store to Remote Servers, Nextcloud, Amazon S3, Google Drive, Dropbox, Onedrive.
Overview
Automatic Database Backup.
This module helps generate backups of your databases automatically at regular intervals. The generated backups can be stored in local storage, on an FTP server, SFTP server, Dropbox, Nextcloud, Google Drive, OneDrive, and Amazon S3. Additionally, there are features for automatically deleting old backups and enabling email notifications.
This module uses an external python dependency 'dropbox'. Before installing the module install the python package first. The required python package can be installed using the following command,
pip install dropbox
This module uses an external python dependency 'nextcloud'. Before installing the module install the python package first. The required python package can be installed using the following command,
pip install pyncclient
This module uses an external python dependency 'nextcloud-api-wrapper'. Before installing the module install the python package first. The required python package can be installed using the following command,
pip install
nextcloud-api-wrapper
This module uses an external python dependency 'Boto3'. Before installing the module install the python package first. The required python package can be installed using the following command,
pip install boto3
This module uses an external python dependency 'paramiko'. Before installing the module install the python package first. The required python package can be installed using the following command,
pip install paramiko
Screenshots
Automatic Database Backup.
Database Backup Configuration Menu.
Go to Setting --> Technical --> Backup Configuration to configure backups.

Create New Database Backup Configuration.
Enter the Database Name and Master Password. Specify Backup Destination. Enter the backup directory path, if directory does not exist new directory will be created.

Store Backup to Remote SFTP Server.
Select Backup Destination as SFTP, enter credentials. "TEST CONNECTION" button to check whether the connection is successful.

Store Backup to Remote FTP Server.
Select Backup Destination as FTP, enter credentials. "TEST CONNECTION" button to check whether the connection is successful.

Store Backup to Google Drive.
You'll need to create a new Google API project and enabling the Google Drive API, Go to the Google API Console and log into your account. While creating the project, for the Redirect URI restrictions, copy your Odoo database URI followed by /google_drive/authentication. Example:

ENABLE API AND SERVICES

ENALBE GOOGLE DRIVE API

Create Credentials, Follow the steps, select Website application for the Application Type.

Under the Authorized JavaScript Origins section, click + Add URI and type your company's Odoo URL address. Under the Authorized redirect URIs section, click + Add URI and type your company's Odoo URL address followed by /google_drive/authentication. After all the steps are completed, A Client ID and Client secret will be given, copy the credentials

Go to the "OAuth consent screen", then Test users and click on 'ADD USERS' then add the user.

Configure Backup, Copy Client ID and Client Secret from Google Drive API Credentials page into their respective fields.

Setup Token, it will be redirected to an authorization page.

Grant Access

Reset the token if required by clicking on the "Reset Token"

Store Backup to Dropbox.
To get the app key and secret key go to the App Console. Create a new app

Once you created the App , you can get the App key and App Secret as seen in the screenshot.

Choose your app's permission (files.content.write and files.content.read permissions required).then click on Submit

Choose Dropbox as that of the backup destination. Enter the app secret and key and dropbox Folder.

Click on the Setup Token

Get the Authorization Code and click confirm.

Reset the refresh token if required by clicking on the "Reset Token"

Store Backup to Onedrive.
Select Backup Destination as OneDrive. Enter the App key and App secret. you'll need to register a new app in the Microsoft Azure portal. While registering the app for the Redirect URI restrictions, copy your Odoo database URI followed by /onedrive/authentication. Example:

Copy the Client ID

Generate Client Secret.

Get OneDrive folder ID, where need to store the backup files.


Configure the Backup.

Setup Token, it will be redirected to an authorization page.

Grant Access

Reset the token if required by clicking on the "Reset Token"

Store Backup to Nextcloud.

To Create an account in Nextcloud go to https://nextcloud.com/sign-up/, Enter Your Email Address and Sign up .

You will be redirected to the page as shown in the screenshot, and it will ask you enter your email and password for the Nextcloud.

To get the Domain of the Nextcloud.Go to Settings in the Nextcloud and Click on Mobile & desktop. You will see server address Copy link and paste it in your Domain Name.

Select the backup destination as Nextcloud. Enter the Domain Name, UserName, Password and Folder Name where you want to store your backup on the NextCloud server. Check the Connect button to check if the connection is successful.

Every day, a Scheduled Action will take place to store a backup on the Nextcloud Server. The backup will be stored as the folder name provided in the Folder ID field in Odoo.

Store Backup to Amazon S3.
To Create an account in Amazon S3 go to https://portal.aws.amazon.com/billing/signup#/start/email, Enter Your Email Address and Sign up .

After you created the account.You need to get the Access Key and Secret Key,To get these go the account Security credentails and go the Access Keys and create new access keys from there you will get Access Key and Secret Key.



Next You need to create a Bucket Folder in the Amazon S3.To do that Go the Services in the top right and go to Storage and S3 as shown in the Screen shot.

To create Bucket folder,Click on the Create bucket Button.

On Creating a Bucket Folder,Check the rules for naming the Bucket folder,and Select the region as well.After that click on the create Bucket Button in the bottom of the page.

You will see the Bucket Folder as shown in the screenshot.

Select Backup Destination as Amazon S3. Enter the Amazon S3 Access Key,Amazon S3 Secret Key,Bucket Name->Bucket folder you have created in the Amazon S3 and the File Name->The Folder You want to store your backup in Amazon S3 Bucket Folder.Test connection button to check whether the connection is successful.

Every day, a Scheduled Action will take place to store a backup on the Amazon S3 Server. The backup will be stored as the folder name provided in the File Name field in Odoo.

Automatically Remove Old Backups.
Enable auto remove option, specify number of days to remove backups.

Notify User on Success and Failure of Backup Generation.
Enable notify user option, and select a user to notify. An email notification will be sent to the selected user on backup successful and failure.

Successful backup notification email.

Notification email when backup generation failed.

Scheduled Action For Generating Backup.
Enable the 'Automatic database Backup' scheduled action, and set up the execution interval. Based on the scheduled action setup, backups will be generated on regular intervals.


FEATURES
Comprehensive Features of AUTOMATIC DATABASE BACKUP
Interactive User Interface.
Store Backup To Different Locations.
Automatically Remove Old Backups.
Generate Database Backups on regular intervals.
Notify User On Success And Failure Of Backup Generation.
Stores To Remote Servers, Nextcloud, Amazon S3, Google Drive, Dropbox, Onedrive.
FAQ
After each backup attempt, you will receive a notification indicating whether it was successful or if it encountered a failure.
On the Backup Configuration, we have the option to select a backup format whether zip or dump. Choosing zip will provide filestore while dump will not.
Enable auto-remove option from backup configuration to automatically delete old backups.
Certainly! You can back up directly to your local system by selecting the destination as local storage and specifying the desired path for the backup.
RELEASE NOTES
Version 17.0.3 I Updated on : 18th April 2024
Fixed all the issues while inputting list_db = False.
Version 17.0.2 I Updated on : 31st November 2023
Updated the database name check function which got access denied when list_db=False.
Version 17.0.1 I Released on : 6th October 2023
Initial commit for auto_database_backup
Related Modules
Explore our related modules

Our Services

Odoo Customization

Odoo Implementation

Odoo Support

Hire Odoo Developer

Odoo Integration

Odoo Migration

Odoo Consultancy

Odoo Implementation

Odoo Licensing Consultancy
Our Industries

Trading
Easily procure and sell your products

POS
Easy configuration and convivial experience

Education
A platform for educational management

Manufacturing
Plan, track and schedule your operations

E-commerce & Website
Mobile friendly, awe-inspiring product pages

Service Management
Keep track of services and invoice

Restaurant
Run your bar or restaurant methodically

Hotel Management
An all-inclusive hotel management application
Support
Need help? Get in touch.


Say hi to us on WhatsApp!
+91 86068 27707

Skype
Say hi to us on Skype!
cybroopenerp

Please log in to comment on this module
Report comment
Any abuse of this reporting system will be penalizederror Onedrive
Onedrive Exception: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
Works well with FTP and Local BackUp
I am using this app on Odoo 17 Community Edition, I do two different types of auto backup one via FTP another is a local server backup both works flawless. I am appreciate your app as this is free but we will definitely support your company other paid app. Look forward to see other good app from you for Odoo. Thank You
Re: Works well with FTP and Local BackUp
Thanks for the review
Retension not working...
Hello, the backup works fine. Out target is NetxCloud. But since some days we get the following error mail:
Backup generation of the database XXX has been Failed.
Database Name: XXX
Destination: NextCloud
Backup Path: Backup
Backup Type: zip
Error Message:
time data '12-35-29.zip' does not match format '%Y-%m-%d'
The files are created in NextCloud, but I think, its the remove old backups function. We use the german localization.
Re: Retension not working...
Thanks for reporting. We have updated the app. Please get the latest version.
Backup process generate 0 Zip file in 17v
I got this error in config file:
FTP Exception: Command '['c:\\program files\\postgresql\\16\\bin\\pg_dump.exe', '--no-owner', 'TestEnv', '--file=C:\\Windows\\SERVIC~1\\LOCALS~1\\AppData\\Local\\Temp\\tmpex9pa1d0\\dump.sql']' returned non-zero exit status 1
Before was working fine with me v16
Could you please help.
Can't find the backup zip file on google drive, how to debug the module ?
Hello, backup seems to work, I received the email, confirming the backup is done and sent, with a file name, I can see also INFO in the log file, about the backup and the mail sent, but I can't find the zip file on the google drive of destination, the token is valid, the id of the folder is on a shared drive, I create, I think there's a misconfiguration in google,
is there a way to have also the log of the google drive API call, to check if I can see an error, by running odoo in DEBUG, but If I want to have only DEBUG for the module how can i do that ?
Thanks in advance for any help
Can't create zip on google drive
I have installed in v17 instance and configured to work with Google Drive. With dump DB it works fine (although it does not send any email) but if I change to the Zip format it simply does not generate anything...
Hi,
I tried to install the package but got the following error message "Python library not installed: dropbox ". I installed odoo on dockerhub using docker compose. How can I fix it?
Thanks in advance
Re:
Hi, Please use the below command to install Dropbox in your Odoo docker container.
Replace 'container' with your odoo container name.
Access Denied
This module was working fine on odoo 16. but the 17 version throws an "access denied" error while saving.
Re: Access Denied
The access denied is occurring due to the inability to list databases due to having list_db=False on your Odoo conf file. Please check your odoo service configuration
Cant backup with google drive and dropbox
I was config google drive and dropbox and it was set "Refresh token set" sussess but it not working, i try "Run manualy" in Scheduled Actions but it notification "Please check connection"
Re: Cant backup with google drive and dropbox
Please try installing the latest module and let us know if the issue persists.
No such file
Estoy recibiendo este mensaje al correo. Porfavor podrian darme mas detalles del error:
Backup generation of the database XXXXX has been Failed.
Database Name: XXXXX
Destination: SFTP Server
Backup Path: /volume1/Backups
Backup Type: zip
Error Message:
[Errno 2] No such file
Re: No such file
Please make sure you have the latest version of the app.
Assistance
I'm facing an issue while scheduling automatic database backups in Odoo. The error message is as follows:
The error points to a CalledProcessError with the command pg_dump. This is happening when trying to trigger an automatic backup through the scheduled action in Odoo. Do you have any insights on why this might be happening and how to resolve it? Any help would be greatly appreciated!
Re: Assistance
Thank you for reporting the issue. We’ve tested the backup functionality with our database and encountered no problems. We’ll need details about your backup destination, database size, and configuration to investigate further. This will help us identify the cause and provide a solution. You can email us at odoo@cybrosys.com
I'm restoring the backup but i get thie error
Database restore error: Bad CRC-32 for file 'dump.sql'
Re: I'm restoring the backup but i get thie error
Thank you for reporting the issue. Could you please provide more details, including details about the backup destination? You can email to odoo@cybrosys.com.
Errno 13
in local storage it take back up correctly
but when I user FTP backup I got this error:
Error Message:
[Errno 13] Permission denied: 'C:\\Windows\\SERVIC~1\\LOCALS~1\\AppData\\Local\\Temp\\tmpiee23f_h.zip'
also from the server I have access to FTP but system is not take automatically
Re: Errno 13
This may be related to permission settings. Please ensure that the application has the necessary permissions to access the specified directory.
For detailed guidance on setting up FTP and managing permissions, see our blog, How to Setup FTP Server on Ubuntu 20.04.
Google Drive Exception: 'files'
Hi,
I Have installed this module on my community server and want to store backup on Google drive. While i have enabled all the settings and successfully integrate the google drive.
when i am running the schedule action it returns error:
Google Drive Exception: 'files'
How could i resolve it.
Re: Google Drive Exception: 'files'
We attempted to recreate the issue mentioned but were unable to. Could you please provide more information, like your configuration details? You can email them to odoo@cybrosys.com
Hello, I'm trying to use this plugin using a FTPS connection. How can I manage it ?
Re:
To set up an FTP server, please refer to the blog:
https://www.cybrosys.com/blog/how-to-setup-ftp-server-on-ubuntu-20-04
Hello, I'm trying to use this plugin using a FTPS connection. How can I manage it ?
Re:
To set up an FTP server, please refer to the blog:
https://www.cybrosys.com/blog/how-to-setup-ftp-server-on-ubuntu-20-04
Hello, I'm trying to use this plugin using a FTPS connection. How can I manage it ?
Hello, I'm trying to use this plugin using a FTPS connection. How can I manage it ?
hi, where can i find the master password in odoo sh database
Re:
Unfortunately, the module isn't supported on Odoo SH.
PermissionError: [Errno 13] Permission denied:
/ RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files\Odoo 17.0e.20240806\server\odoo\addons\auto_database_backup\models\db_backup_configure.py", line 988, in _schedule_auto_backup
with open(temp.name, "wb+") as tmp:
^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Windows\\SERVIC~1\\LOCALS~1\\AppData\\Local\\Temp\\tmp4eresdxp.zip'
Re: PermissionError: [Errno 13] Permission denied:
Could you please provide more details about when this error occurred and specify the chosen backup destination? This information will help in diagnosing the issue. You can email to odoo@cybrosys.com
Permission Denied.
I installed Odoo using Docker, and when using the backup module, I encountered a 'permission denied' error when accessing a directory. So, is the permission related to the db_user or some other user? As I understand it, the db_user isn't part of the OS system to access or create a backup file, right?
Re: Permission Denied.
Could you please share the log you encountered when this error occurred? This will help in diagnosing the issue.
You can email us at odoo@cybrosys.com
Need guidance for Odoo SH Setup
Facing issue to Set Master Password in the configuration. Please describe more for setup in the Odoo SH.
Re: Need guidance for Odoo SH Setup
Unfortunately, the module isn't supported on Odoo SH.
Command
How and where can I execute the command "pip install dropbox"??
Re: Command
If you're using an on-premise server, you can execute the command directly in the terminal.
If you're using Odoo.sh, Add 'dropbox' to your 'requirements.txt' file, then commit and push the changes. Odoo.sh will install the package during the build process.
Great Plugin
It works properly, and it's easy toi install and setup
OneDrive
For the Onedrive as the target, does this work for Onedrive for Business as well? If yes, how can the folder ID be determined?
Re: OneDrive
Currently, this feature is not available in our module. However, our team is actively working on it, and we will notify you as soon as it becomes available.
S3 Compatible
Hello,
Does this work with s3-compatible buckets (i.e., not from AWS)?
Re: S3 Compatible
Sorry. It won't work.
Hello, I try to install Python library of dropbox and install all okay but when try to install module get this messege "Python library version conflict: dropbox"
Re: Hello, I try to install Python library of dropbox and install all okay but when try to install module get this messege "Python library version conflict: dropbox"
Please try installing Dropbox version 11.36.2
the backup configuration does not show under setting
I can't find the configuration under Setting --> Technical. Installation seems fine with no issue.
any idea or suggestion?
thanks
the backup configuration does not show under setting
Setting --> Technical --> Backup Configuration to configure backups
Installed this package with no problem, but I can see the configuration under Setting --> Technical.
Any possible reason?
thanks.
Can't find the backup zip file on google drive, how to debug the module ?
Hello, backup seems to work, I received the email, confirming the backup is done and sent, with a file name, I can see also INFO in the log file, about the backup and the mail sent, but I can't find the zip file on the google drive of destination, the token is valid, the id of the folder is on a shared drive, I create, I think there's a misconfiguration in google,
is there a way to have also the log of the google drive API call, to check if I can see an error, by running odoo in DEBUG, but If I want to have only DEBUG for the module how can i do that ?
Thanks in advance for any help
Hello, backup seems to work, I received the email, confirming the backup is done and sent, with a file name, I can see also INFO in the log file, about the backup and the mail sent, but I can't find the zip file on the google drive of destination, the token is valid, the id of the folder is on a shared drive, I create, I think there's a misconfiguration in google, is there a way to have also the log of the google drive API call, to check if I can see an error, by running odoo in DEBUG, but If I want to have only DEBUG for the module how can i do that ? Thanks in advance for any help
Error google drive
Google Drive Exception: 'files'
Re: Error google drive
I regret to inform you that we couldn't replicate the issue in our end. To better assist you and speed up the resolution process, could you please provide us with more details about the problem?
Sharing a demo video or screenshots would be especially helpful in gaining a clearer understanding of the circumstances related to the issue.
Access denied when database listing disabled - Solved
Hi,
I've tested the new version, and indeed the problem with the list_db setting is solved.
Thank you.
Access denied when database listing disabled
This module isn't working when database listing is disabled in odoo config.
Since this is a security measure,as it disables database management features on the front-end , it isn't an option to enable database listing.
This makes this module unusable.
Re: Access denied when database listing disabled
Hello, We have resolved the database listing issue. The latest version is now available for download and update.
odoo.addons.auto_database_backup.models.db_backup_configure: FTP Exception: Command '['/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpnsavhcaz/dump.sql', '20240216']' returned non-zero exit status 1.
psql version is 11.11, ensure chown -R to folder accessable, and database password correct
is there any causes or setting inproper?
Re:
The error you're encountering may be due to a configuration issue with FTP. Please ensure that you're configuring FTP correctly. For your reference, you can check out the following blog which provides a guide on setting up an FTP server on Ubuntu 20.04: https://www.cybrosys.com/blog/how-to-setup-ftp-server-on-ubuntu-20-04
hi
"Hi,
I installed the module, and at first, it was working correctly. However, the scheduled backup action is no longer working, and I have to do the backup manually."
Re: hi
Please share your odoo log with us. You can email to odoo@cybrosys.com
I am trying to create a local database backup but I am getting an "access denied" error. What is the best place to store the backups and what permissions should the folder directory have?
Re:
You can choose a directory where the Odoo system user has the Create access, to store the database backup.
Another cause of the 'Access denied, error can be the wrong credentials, please make sure the Master Password provided is also correct.
Hi
backup file size is zero
Hello, After 1 week working perfectly, I got this error running the backup task schedule
An error occurred while generating the token. Your authorization code may be invalid or has already expired [invalid_grant]. You should check your Client ID and secret on the Google APIs plateform or try to stop and restart your calendar synchronisation.
Re:
This error message is generated while creating a refresh token if the token validity expires. This may occur due to a mismatch with the server time or the expiry of the token itself. Try reauthenticating the Google API credentials. To better assist you and expedite a resolution, please contact us at odoo@cybrosys.com
Security flow by enabling list_db...
Thanks for the reply. but keeping list_db enabled is not a healthy move. any alternative ways?
Re: Security flow by enabling list_db...
It will need some modifications on the app. It will be better if you can drop an email to odoo@cybrosys.com. Then our team will do the needful.
Does this module only backup database? What about the file store?
Re:
On the Backup Configuration, we have the option to select a backup format whether zip or dump. Choosing zip will provide filestore while dump will not.