v 14.0 Third Party 7223
Download for v 14.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 1417
Technical Name auto_database_backup
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 12.0 14.0 13.0 15.0 16.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 1417
Technical Name auto_database_backup
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 12.0 14.0 13.0 15.0 16.0 17.0
Community
Enterprise

Automatic Database Backup

A Module for generating database backup and storing backup to multiple locations.

Overview

This module helps to generate backups of your databases automatically on regular interval of times. The generated backups can be stored into local storage, ftp server, sftp server, dropbox,nextcloud, Google Drive or Onedrive and Amazon S3. User can enable auto remove option to automatically delete old backups. User can enable email notification to be notified about the success and failure of the backup generation and storage. Using Automatic Database Backup module user can generate and store database backups to multiple location.


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

Features

Community & Enterprise Support

Available in Odoo 14.0 Community and Enterprise.

Generate Database Backup

Generate database backups on regular intervals.

Store Backup to FTP Server

Generated backup can be stored to remote FTP server.

Store Backup to SFTP Server

Generated backup can be stored to remote SFTP server.

Store Backup to Google drive

Generated backup can be stored to google drive

Store Backup to Dropbox

Generated backup can be stored to Dropbox

Store Backup to Onedrive

Generated backup can be stored to Onedrive

Store Backup to Nextcloud

Generated backup can be stored to Nextcloud

Store Backup to Amazon S3

Generated backup can be stored to Amazon S3

Automatically remove old backups.

Old backups files will be deleted automatically based on the obsolescence of backup.

Notify user on success and failure of backup generation

An email notification send to user on successful backup generation also send an email notification when backup operation failed.

Screenshots

Database Backup Configuration Menu

Got Setting --> Technical --> Backup Configuration to configure backups

Crate New Database Backup Configuration

Enter the database name and master password. specify backup type and 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.

A successful message will be displayed if connection is successful

An error message will be displayed if test connection is failed

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

ENABLE 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.

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.

Get the Authorization Code and click confirm.

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.

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 credentials 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.

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.

Suggested Products


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

Need Help?


+91 86068 27707

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Need Help here!!!!
by
Luis Alejandro del Castillo Riley
on 3/18/23, 2:40 PM

This is happening when go to general settings and click on Refresh token set. Or Click on
Google drive template

Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 685, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1394, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 397, in call_kw
    result = _call_kw_model_create(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 377, in _call_kw_model_create
    result = method(recs, *args, **kwargs)
  File "", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 326, in _model_create_single
    return create(self, arg)
  File "/mnt/enterprise/account_accountant/models/res_config_settings.py", line 55, in create
    return super().create(vals)
  File "", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 326, in _model_create_single
    return create(self, arg)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/res_config.py", line 783, in create
    return super(ResConfigSettings, self).create(values)
  File "", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 347, in _model_create_multi
    return create(self, [arg])
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_fields.py", line 534, in create
    recs = super().create(vals_list)
  File "", line 2, in create
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 348, in _model_create_multi
    return create(self, arg)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3833, in create
    raise ValueError("Invalid field %r on model %r" % (key, self._name))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'google_gmail_client_identifier' on model 'res.config.settings'

 

Re: Need Help here!!!!
by
Cybrosys Technologies
on 3/28/23, 7:40 AM Author

This error is not related to this app. 
Anyway, This issue can be solved by installing the 'google_gmail' module.


by
ubuntu
on 9/5/22, 8:14 AM



Backup with 0 file size
by
Zahid Mehmood
on 6/23/23, 1:11 PM

All the database being backup on local storage are of 0 file size, do you know the reason?

Re: Backup with 0 file size
by
Cybrosys Technologies
on 6/27/23, 5:26 AM Author

We were unable to replicate the issue. In order to assist you further, kindly share your log details with odoo@cybrosys.com


by
Igor
on 5/4/23, 7:23 AM

How to restore this backup ?

Re:
by
Cybrosys Technologies
on 5/4/23, 8:18 AM Author

Same as normal odoo db backups


Evaluating
by
Julio C. Abad Del Aguila
on 3/27/23, 2:19 PM

Do you have Ondrive Backup support for Odoo V14 Entreprise (SH)?

Please comment.


Re: Evaluating
by
Cybrosys Technologies
on 3/28/23, 3:12 AM Author

The feature of storing backup to Onedrive is only available in V15 and V16. It is not available in V14.


by
Mission Critical Inc
on 10/17/22, 11:09 AM

Does this module backup data AND file store? Or just data?

Re:
by
Cybrosys Technologies
on 10/19/22, 6:49 AM Author

It can backup both data and file store. In the backup configuration, select Backup Format as 'zip' to backup both data and filestore, if it's 'dump' then the backup will contain only data.


by
Mohammed Alawi
on 10/12/22, 1:43 AM

Hi .. Would you please check this error:

Hi Would you please check this error:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1394, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 397, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 377, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 326, in _model_create_single
return create(self, arg)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/res_config.py", line 783, in create
return super(ResConfigSettings, self).create(values)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 347, in _model_create_multi
return create(self, [arg])
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 348, in _model_create_multi
return create(self, arg)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3833, in create
raise ValueError("Invalid field %r on model %r" % (key, self._name))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'google_gmail_client_identifier' on model 'res.config.settings'

Re:
by
Cybrosys Technologies
on 10/19/22, 7:17 AM Author

Can you share some more details, In what context this error is happening?.


I can not install since I get import error
by
Couchoud Tim
on 8/13/22, 5:01 AM

Can you please help and explain why I get this error?

Thx.

Erreur:

Odoo Server Error


Traceback (most recent call last):

  File "/opt/devodoo/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "/opt/devodoo/odoo/odoo/http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "/opt/devodoo/odoo/odoo/http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/devodoo/odoo/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/devodoo/odoo/odoo/http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/devodoo/odoo/odoo/http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "/opt/devodoo/odoo/odoo/http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "/opt/devodoo/odoo/addons/web/controllers/main.py", line 1398, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/opt/devodoo/odoo/addons/web/controllers/main.py", line 1386, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/devodoo/odoo/odoo/api.py", line 399, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/opt/devodoo/odoo/odoo/api.py", line 386, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-72>", line 2, in button_immediate_install

  File "/opt/devodoo/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log

    return method(self, *args, **kwargs)

  File "/opt/devodoo/odoo/odoo/addons/base/models/ir_module.py", line 475, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "/opt/devodoo/odoo/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/opt/devodoo/odoo/odoo/modules/registry.py", line 89, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/opt/devodoo/odoo/odoo/modules/loading.py", line 459, in load_modules

    processed_modules += load_marked_modules(cr, graph,

  File "/opt/devodoo/odoo/odoo/modules/loading.py", line 347, in load_marked_modules

    loaded, processed = load_module_graph(

  File "/opt/devodoo/odoo/odoo/modules/loading.py", line 179, in load_module_graph

    load_openerp_module(package.name)

  File "/opt/devodoo/odoo/odoo/modules/module.py", line 385, in load_openerp_module

    __import__('odoo.addons.' + module_name)

  File "/opt/devodoo/custom-addons/auto_database_backup/__init__.py", line 23, in <module>

    from . import models

  File "/opt/devodoo/custom-addons/auto_database_backup/models/__init__.py", line 21, in <module>

    from . import db_backup_configure

  File "/opt/devodoo/custom-addons/auto_database_backup/models/db_backup_configure.py", line 30, in <module>

    import paramiko

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/opt/devodoo/odoo/odoo/http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/devodoo/odoo/odoo/http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

ModuleNotFoundError: No module named 'paramiko'

Re: I can not install since I get import error
by
Cybrosys Technologies
on 8/19/22, 4:46 AM Author
Hi,
The error is occurring because the 'paramiko' python package is missing in your environment.
You can install the package by running the following command in the terminal:
pip3 install paramiko