diff --git a/auto_database_backup/README.rst b/auto_database_backup/README.rst new file mode 100644 index 000000000..484d7ce15 --- /dev/null +++ b/auto_database_backup/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Auto Database Backup +==================== +* Generate Database Backups and store to multiple locations + +License +======= +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +======= +* Cybrosys Techno Solutions __ + +Credits +======= +* Developer: (v12) Ajmunnisa @ Cybrosys , Contact : odoo@cybrosys.com + +Contacts +======== +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/auto_database_backup/__init__.py b/auto_database_backup/__init__.py new file mode 100644 index 000000000..097bdb395 --- /dev/null +++ b/auto_database_backup/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/auto_database_backup/__manifest__.py b/auto_database_backup/__manifest__.py new file mode 100644 index 000000000..f6ba245b8 --- /dev/null +++ b/auto_database_backup/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Auto Database Backup", + 'version': '12.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Generate automatic backup of databases and store to local, ' + 'google drive, dropbox, nextcloud, amazon S3, onedrive or ' + 'remote server', + 'description': 'This module has been developed for creating database ' + 'backups automatically and store it to the different ' + 'locations,database backup, backup, Google Drive, Dropbox, ' + 'Onedrive, Nextcloud, Amazon S3, automatic backup', + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['mail', 'google_drive'], + 'data': [ + 'security/ir.model.access.csv', + 'data/ir_cron_data.xml', + 'data/mail_template_data.xml', + 'views/db_backup_configure_views.xml' + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/auto_database_backup/data/ir_cron_data.xml b/auto_database_backup/data/ir_cron_data.xml new file mode 100644 index 000000000..6d6d9ce90 --- /dev/null +++ b/auto_database_backup/data/ir_cron_data.xml @@ -0,0 +1,16 @@ + + + + + + Backup : Automatic Database Backup + + code + model._schedule_auto_backup() + 1 + days + -1 + False + + + diff --git a/auto_database_backup/data/mail_template_data.xml b/auto_database_backup/data/mail_template_data.xml new file mode 100644 index 000000000..e8760d086 --- /dev/null +++ b/auto_database_backup/data/mail_template_data.xml @@ -0,0 +1,126 @@ + + + + + + + Database Backup: Notification Successful + + Database Backup Successful: + ${object.db_name} + + ${object.user_id.email_formatted | safe} + + +

+ Dear ${object.user_id.sudo().name}, + +
+
+ Backup of the database + ${object.db_name} + has been successfully + generated and stored to + % if object.backup_destination in ('local'): + Local + % elif object.backup_destination in ('google_drive'): + Google Drive + % elif object.backup_destination in ('ftp'): + FTP Server + % elif object.backup_destination in ('sftp'): + SFTP Server + % endif + . +
+
+ Database Name: ${object.db_name} +
+ Destination: + % if object.backup_destination in ('local'): + Local + % elif object.backup_destination in ('google_drive'): + Google Drive + % elif object.backup_destination in ('ftp'): + FTP Server + % elif object.backup_destination in ('sftp'): + SFTP Server + % endif + % if object.backup_destination in ('local', 'ftp', + 'sftp') +
+ Backup Path: + % if object.backup_destination in ('local'): + ${object.backup_path} + % elif object.backup_destination in ('ftp'): + ${object.ftp_path} + % elif object.backup_destination in ('sftp'): + ${object.sftp_path} + % endif + % endif +
+ Backup Type: ${object.backup_format} +
+ Backup FileName: ${object.backup_filename} +
+

+
+
+ + + Database Backup: Notification Failed + + Database Backup Failed: ${object.db_name} + + ${object.user_id.email_formatted | safe} + + +

+ Dear ${object.user_id.sudo().name}, + +
+
+ Backup generation of the + database ${object.db_name} has been + Failed. +
+
+ Database Name: ${object.db_name} +
+ Destination: + % if object.backup_destination in ('local'): + Local + % elif object.backup_destination in ('google_drive'): + Google Drive + % elif object.backup_destination in ('ftp'): + FTP Server + % elif object.backup_destination in ('sftp'): + SFTP Server + % endif + % if object.backup_destination in ('local', 'ftp', + 'sftp') +
+ Backup Path: + % if object.backup_destination in ('local'): + ${object.backup_path} + % elif object.backup_destination in ('ftp'): + ${object.ftp_path} + % elif object.backup_destination in ('sftp'): + ${object.sftp_path} + % endif + % endif +
+ Backup Type: ${object.backup_format} +
+
+ Error Message: +
+ ${object.generated_exception} +
+

+
+
+
+
diff --git a/auto_database_backup/doc/RELEASE_NOTES.md b/auto_database_backup/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6cf26b22d --- /dev/null +++ b/auto_database_backup/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 12.02.2024 +#### Version 12.0.1.0.0 +#### ADD +- Initial commit for Auto Database Backup diff --git a/auto_database_backup/models/__init__.py b/auto_database_backup/models/__init__.py new file mode 100644 index 000000000..42cf68723 --- /dev/null +++ b/auto_database_backup/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import db_backup_configure diff --git a/auto_database_backup/models/db_backup_configure.py b/auto_database_backup/models/db_backup_configure.py new file mode 100644 index 000000000..15230e059 --- /dev/null +++ b/auto_database_backup/models/db_backup_configure.py @@ -0,0 +1,328 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import datetime +import errno +import ftplib +import json +import logging +import os +import odoo +import paramiko +import requests +import tempfile +from odoo import api, fields, models, _ +from odoo.exceptions import UserError, ValidationError +from odoo.service import db + +_logger = logging.getLogger(__name__) + + +class DbBackupConfigure(models.Model): + """Model for database backup configuration and backup functions""" + _name = 'db.backup.configure' + _description = 'Db Backup Configure' + + name = fields.Char(string='Name', required=True, + help='Name of the backup configuration') + db_name = fields.Char(string='Database Name', required=True, + help='Name of the database') + master_pwd = fields.Char(string='Master Password', required=True, + help='Master password of the database') + backup_format = fields.Selection([ + ('zip', 'Zip'), + ('dump', 'Dump') + ], string='Backup Format', default='zip', required=True, + help='Backup Format') + backup_destination = fields.Selection([ + ('local', 'Local Storage'), + ('google_drive', 'Google Drive'), + ('ftp', 'FTP'), + ('sftp', 'SFTP') + ], string='Backup Destination', + help='Specify the location that the backup need to store') + backup_path = fields.Char(string='Backup Path', + help='Local storage directory path') + sftp_host = fields.Char(string='SFTP Host', help='SFTP Host Name') + sftp_port = fields.Char(string='SFTP Port', default=22, help='SFTP Port') + sftp_user = fields.Char(string='SFTP User', help='SFTP user name') + sftp_password = fields.Char(string='SFTP Password', help='SFTP Password') + sftp_path = fields.Char(string='SFTP Path', help='SFTP Path') + ftp_host = fields.Char(string='FTP Host', help='FTP Host Name') + ftp_port = fields.Char(string='FTP Port', default=21, help='FTP Port') + ftp_user = fields.Char(string='FTP User', help='FTP User') + ftp_password = fields.Char(string='FTP Password', help='FTP password') + ftp_path = fields.Char(string='FTP Path', help='FTP Path') + active = fields.Boolean(default=True, + help='To know the configuration is active') + save_to_drive = fields.Boolean(help='To know that the backup need ' + 'to save in drive') + auto_remove = fields.Boolean(string='Remove Old Backups', + help='Remove old backup if the value is true') + days_to_remove = fields.Integer(string='Remove After', + help='Automatically delete stored backups ' + 'after this specified number of days') + google_drive_folder = fields.Char(string='Drive Folder ID') + notify_user = fields.Boolean(string='Notify User', + help='Send an email notification to user ' + 'when the backup operation is successful' + ' or failed') + user_id = fields.Many2one('res.users', string='User') + backup_filename = fields.Char(string='Backup Filename', + help='For Storing generated backup filename') + generated_exception = fields.Char(string='Exception', + help='Exception Encountered while Backup ' + 'generation') + + @api.constrains('db_name', 'master_pwd') + def _check_db_credentials(self): + """Validate entered database name and master password""" + database_list = db.list_dbs() + if self.db_name not in database_list: + raise ValidationError(_("Invalid Database Name!")) + try: + odoo.service.db.check_super(self.master_pwd) + except Exception: + raise ValidationError(_("Invalid Master Password!")) + + def test_connection(self): + """Test the sftp and ftp connection using entered credentials""" + if self.backup_destination == 'sftp': + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + try: + client.connect(hostname=self.sftp_host, + username=self.sftp_user, + password=self.sftp_password, + port=self.sftp_port) + sftp = client.open_sftp() + sftp.close() + except Exception as e: + raise UserError(_("SFTP Exception: %s", e)) + finally: + client.close() + elif self.backup_destination == 'ftp': + try: + ftp_server = ftplib.FTP() + ftp_server.connect(self.ftp_host, int(self.ftp_port)) + ftp_server.login(self.ftp_user, self.ftp_password) + ftp_server.quit() + except Exception as e: + raise UserError(_("FTP Exception: %s", e)) + title = _("Connection Test Succeeded!") + message = _("Everything seems properly set up!") + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': title, + 'message': message, + 'sticky': False, + } + } + + def _schedule_auto_backup(self): + """Function for generating and storing backup + Database backup for all the active records in backup configuration + model will be created""" + records = self.search([]) + mail_template_success = self.env.ref( + 'auto_database_backup.mail_template_data_db_backup_successful') + mail_template_failed = self.env.ref( + 'auto_database_backup.mail_template_data_db_backup_failed') + for rec in records: + backup_time = datetime.datetime.utcnow().strftime( + "%Y-%m-%d_%H-%M-%S") + backup_filename = "%s_%s.%s" % ( + rec.db_name, backup_time, rec.backup_format) + rec.backup_filename = backup_filename + # Local backup + if rec.backup_destination == 'local': + try: + if not os.path.isdir(rec.backup_path): + os.makedirs(rec.backup_path) + backup_file = os.path.join(rec.backup_path, + backup_filename) + file_open = open(backup_file, "wb") + odoo.service.db.dump_db(rec.db_name, file_open, + rec.backup_format) + file_open.close() + # remove older backups + if rec.auto_remove: + for filename in os.listdir(rec.backup_path): + file = os.path.join(rec.backup_path, filename) + create_time = datetime.datetime.fromtimestamp( + os.path.getctime(file)) + backup_duration = \ + datetime.datetime.utcnow() - create_time + if backup_duration.days >= rec.days_to_remove: + os.remove(file) + if rec.notify_user: + mail_template_success.send_mail(rec.id, + force_send=True) + except Exception as e: + rec.generated_exception = e + _logger.info('FTP Exception: %s', e) + if rec.notify_user: + mail_template_failed.send_mail(rec.id, force_send=True) + # FTP backup + elif rec.backup_destination == 'ftp': + try: + ftp_server = ftplib.FTP() + ftp_server.connect(rec.ftp_host, int(rec.ftp_port)) + ftp_server.login(rec.ftp_user, rec.ftp_password) + ftp_server.encoding = "utf-8" + temp = tempfile.NamedTemporaryFile( + suffix='.%s' % rec.backup_format) + try: + ftp_server.cwd(rec.ftp_path) + except ftplib.error_perm: + ftp_server.mkd(rec.ftp_path) + ftp_server.cwd(rec.ftp_path) + with open(temp.name, "wb+") as tmp: + odoo.service.db.dump_db(rec.db_name, tmp, + rec.backup_format) + ftp_server.storbinary('STOR %s' % backup_filename, + open(temp.name, "rb")) + if rec.auto_remove: + files = ftp_server.nlst() + for file_open in files: + create_time = datetime.datetime.strptime( + ftp_server. + sendcmd( + 'MDTM ' + file_open)[4:], "%Y%m%d%H%M%S") + diff_days = ( + datetime.datetime.now() - + create_time).days + if diff_days >= rec.days_to_remove: + ftp_server.delete(file_open) + ftp_server.quit() + if rec.notify_user: + mail_template_success.send_mail(rec.id, + force_send=True) + except Exception as e: + rec.generated_exception = e + _logger.info('FTP Exception: %s', e) + if rec.notify_user: + mail_template_failed.send_mail(rec.id, force_send=True) + # SFTP backup + elif rec.backup_destination == 'sftp': + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + try: + client.connect(hostname=rec.sftp_host, + username=rec.sftp_user, + password=rec.sftp_password, + port=rec.sftp_port) + sftp = client.open_sftp() + temp = tempfile.NamedTemporaryFile( + suffix='.%s' % rec.backup_format) + with open(temp.name, "wb+") as tmp: + odoo.service.db.dump_db(rec.db_name, tmp, + rec.backup_format) + try: + sftp.chdir(rec.sftp_path) + except IOError as e: + if e.errno == errno.ENOENT: + sftp.mkdir(rec.sftp_path) + sftp.chdir(rec.sftp_path) + sftp.put(temp.name, backup_filename) + if rec.auto_remove: + files = sftp.listdir() + expired = list(filter(lambda fl: + (datetime.datetime.now() - + datetime.datetime.fromtimestamp( + sftp.stat(fl). + st_mtime)). + days >= rec.days_to_remove, + files)) + for file in expired: + sftp.unlink(file) + sftp.close() + if rec.notify_user: + mail_template_success.send_mail(rec.id, + force_send=True) + except Exception as e: + rec.generated_exception = e + _logger.info('SFTP Exception: %s', e) + if rec.notify_user: + mail_template_failed.send_mail(rec.id, force_send=True) + finally: + client.close() + # Google Drive backup + elif rec.backup_destination == 'google_drive': + temp = tempfile.NamedTemporaryFile( + suffix='.%s' % rec.backup_format) + with open(temp.name, "wb+") as tmp: + odoo.service.db.dump_db(rec.db_name, tmp, + rec.backup_format) + try: + access_token = self.env[ + 'google.drive.config'].sudo().get_access_token() + headers = {"Authorization": "Bearer %s" % access_token} + para = { + "name": backup_filename, + "parents": [rec.google_drive_folder], + } + files = { + 'data': ('metadata', json.dumps(para), + 'application/json; charset=UTF-8'), + 'file': open(temp.name, "rb") + } + requests.post( + "https://www.googleapis.com/upload/drive/v3/files?" + "uploadType=multipart", + headers=headers, + files=files) + if rec.auto_remove: + query = "parents = '%s'" % rec.google_drive_folder + files_req = requests.get( + "https://www.googleapis.com/drive/v3/files?q=%s" + % query, + headers=headers) + files = files_req.json()['files'] + for file in files: + file_date_req = requests.get( + "https://www.googleapis.com/drive/v3/files/" + "%s?fields=createdTime" % + file['id'], + headers=headers) + create_time = file_date_req.json()['createdTime'][ + :19].replace('T', ' ') + diff_days = ( + datetime.datetime.now() - datetime. + datetime.strptime(create_time, + '%Y-%m-%d ' + '%H:%M:%S')).days + if diff_days >= rec.days_to_remove: + requests.delete( + "https://www.googleapis.com/drive/v3/" + "files/%s" % + file['id'], + headers=headers) + if rec.notify_user: + mail_template_success.send_mail(rec.id, + force_send=True) + except Exception as e: + rec.generated_exception = e + _logger.info('Google Drive Exception: %s', e) + if rec.notify_user: + mail_template_failed.send_mail(rec.id, force_send=True) diff --git a/auto_database_backup/security/ir.model.access.csv b/auto_database_backup/security/ir.model.access.csv new file mode 100644 index 000000000..77e11a941 --- /dev/null +++ b/auto_database_backup/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_db_backup_configure,access.db.backup.configure,model_db_backup_configure,base.group_user,1,1,1,1 diff --git a/auto_database_backup/static/description/assets/icons/check.png b/auto_database_backup/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/check.png differ diff --git a/auto_database_backup/static/description/assets/icons/chevron.png b/auto_database_backup/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/chevron.png differ diff --git a/auto_database_backup/static/description/assets/icons/cogs.png b/auto_database_backup/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/cogs.png differ diff --git a/auto_database_backup/static/description/assets/icons/consultation.png b/auto_database_backup/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/consultation.png differ diff --git a/auto_database_backup/static/description/assets/icons/ecom-black.png b/auto_database_backup/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/ecom-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/education-black.png b/auto_database_backup/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/education-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/hotel-black.png b/auto_database_backup/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/hotel-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/license.png b/auto_database_backup/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/license.png differ diff --git a/auto_database_backup/static/description/assets/icons/lifebuoy.png b/auto_database_backup/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/lifebuoy.png differ diff --git a/auto_database_backup/static/description/assets/icons/logo.png b/auto_database_backup/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/logo.png differ diff --git a/auto_database_backup/static/description/assets/icons/manufacturing-black.png b/auto_database_backup/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/manufacturing-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/pos-black.png b/auto_database_backup/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/pos-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/puzzle.png b/auto_database_backup/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/puzzle.png differ diff --git a/auto_database_backup/static/description/assets/icons/restaurant-black.png b/auto_database_backup/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/restaurant-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/service-black.png b/auto_database_backup/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/service-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/trading-black.png b/auto_database_backup/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/trading-black.png differ diff --git a/auto_database_backup/static/description/assets/icons/training.png b/auto_database_backup/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/training.png differ diff --git a/auto_database_backup/static/description/assets/icons/update.png b/auto_database_backup/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/update.png differ diff --git a/auto_database_backup/static/description/assets/icons/user.png b/auto_database_backup/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/user.png differ diff --git a/auto_database_backup/static/description/assets/icons/wrench.png b/auto_database_backup/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/auto_database_backup/static/description/assets/icons/wrench.png differ diff --git a/auto_database_backup/static/description/assets/modules/banner.gif b/auto_database_backup/static/description/assets/modules/banner.gif new file mode 100644 index 000000000..5c7b9ad52 Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner.gif differ diff --git a/auto_database_backup/static/description/assets/modules/banner.png b/auto_database_backup/static/description/assets/modules/banner.png new file mode 100755 index 000000000..65f71eaa3 Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner.png differ diff --git a/auto_database_backup/static/description/assets/modules/banner1.jpg b/auto_database_backup/static/description/assets/modules/banner1.jpg new file mode 100755 index 000000000..5e6b5642c Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner1.jpg differ diff --git a/auto_database_backup/static/description/assets/modules/banner2.jpg b/auto_database_backup/static/description/assets/modules/banner2.jpg new file mode 100644 index 000000000..acc34b287 Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner2.jpg differ diff --git a/auto_database_backup/static/description/assets/modules/banner3.jpg b/auto_database_backup/static/description/assets/modules/banner3.jpg new file mode 100644 index 000000000..2489f0aac Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner3.jpg differ diff --git a/auto_database_backup/static/description/assets/modules/banner4.jpg b/auto_database_backup/static/description/assets/modules/banner4.jpg new file mode 100644 index 000000000..1ce48898d Binary files /dev/null and b/auto_database_backup/static/description/assets/modules/banner4.jpg differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup.zip b/auto_database_backup/static/description/assets/screenshots/backup.zip new file mode 100644 index 000000000..4376b8f7d Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup.zip differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup1.png b/auto_database_backup/static/description/assets/screenshots/backup1.png new file mode 100644 index 000000000..770993add Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup1.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup10.png b/auto_database_backup/static/description/assets/screenshots/backup10.png new file mode 100644 index 000000000..b7ebe8c93 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup10.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup11.png b/auto_database_backup/static/description/assets/screenshots/backup11.png new file mode 100644 index 000000000..5e8a6bb8e Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup11.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup12.png b/auto_database_backup/static/description/assets/screenshots/backup12.png new file mode 100644 index 000000000..05e7392a5 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup12.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup13.png b/auto_database_backup/static/description/assets/screenshots/backup13.png new file mode 100644 index 000000000..d2e1ba8e5 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup13.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup14.png b/auto_database_backup/static/description/assets/screenshots/backup14.png new file mode 100644 index 000000000..1b9641e58 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup14.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup2.png b/auto_database_backup/static/description/assets/screenshots/backup2.png new file mode 100644 index 000000000..6507d59a5 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup2.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup3.png b/auto_database_backup/static/description/assets/screenshots/backup3.png new file mode 100644 index 000000000..a2b4d651a Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup3.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup4.png b/auto_database_backup/static/description/assets/screenshots/backup4.png new file mode 100644 index 000000000..c5139df9a Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup4.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup5.png b/auto_database_backup/static/description/assets/screenshots/backup5.png new file mode 100644 index 000000000..6d6486d13 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup5.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup6.png b/auto_database_backup/static/description/assets/screenshots/backup6.png new file mode 100644 index 000000000..9b0be5bfa Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup6.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup7.png b/auto_database_backup/static/description/assets/screenshots/backup7.png new file mode 100644 index 000000000..0d4e9b446 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup7.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup8.png b/auto_database_backup/static/description/assets/screenshots/backup8.png new file mode 100644 index 000000000..c0dc26f93 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup8.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/backup9.png b/auto_database_backup/static/description/assets/screenshots/backup9.png new file mode 100644 index 000000000..259c703de Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/backup9.png differ diff --git a/auto_database_backup/static/description/assets/screenshots/hero.gif b/auto_database_backup/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5010451e3 Binary files /dev/null and b/auto_database_backup/static/description/assets/screenshots/hero.gif differ diff --git a/auto_database_backup/static/description/banner.jpg b/auto_database_backup/static/description/banner.jpg new file mode 100644 index 000000000..8b30333b8 Binary files /dev/null and b/auto_database_backup/static/description/banner.jpg differ diff --git a/auto_database_backup/static/description/icon.png b/auto_database_backup/static/description/icon.png new file mode 100644 index 000000000..a7ef5152d Binary files /dev/null and b/auto_database_backup/static/description/icon.png differ diff --git a/auto_database_backup/static/description/index.html b/auto_database_backup/static/description/index.html new file mode 100644 index 000000000..a46b98955 --- /dev/null +++ b/auto_database_backup/static/description/index.html @@ -0,0 +1,705 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+ +
+
+
+

+ Auto 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 or Google Drive. + 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.

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community & Enterprise Support

+

+ Available in Odoo 12.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.

+
+
+ +
+
+ +
+
+

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

+ +
+ + +
+

+ 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

+

+ Select backup destination as Google Drive. Enter google drive folder ID. + Enable and configure Google Drive option from general settings. +

+ + +

+ Setup refresh token from general settings +

+ +
+ + +
+

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

+ + +
+ +
+ + + +
+
+

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?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
diff --git a/auto_database_backup/views/db_backup_configure_views.xml b/auto_database_backup/views/db_backup_configure_views.xml new file mode 100644 index 000000000..3520f2603 --- /dev/null +++ b/auto_database_backup/views/db_backup_configure_views.xml @@ -0,0 +1,131 @@ + + + + + db.backup.configure.view.list + db.backup.configure + + + + + + + + + + + + db.backup.configure.view.form + db.backup.configure + +
+ +
+

+ +

+
+ + + + + + + + + +
+ Enable and + configure Google Drive option from General + Settings +
+ + + + + + + + + + + + + +