From ea265960080a3aa70032a7b2b294af5ab04063f8 Mon Sep 17 00:00:00 2001 From: tarteo Date: Wed, 6 Dec 2023 15:31:46 +0100 Subject: [PATCH 1/8] [ADD][16.0] fs_storage_backup Run black [ADD] tests [FIX] Tests [FIX] Tests [ADD] Misconfig tests fixup Fixup --- fs_storage_backup/README.rst | 103 ++++ fs_storage_backup/__init__.py | 1 + fs_storage_backup/__manifest__.py | 14 + fs_storage_backup/data/ir_cron_data.xml | 18 + .../data/mail_message_subtype_data.xml | 15 + fs_storage_backup/models/__init__.py | 1 + fs_storage_backup/models/fs_storage.py | 116 +++++ fs_storage_backup/readme/CONFIGURE.md | 7 + fs_storage_backup/readme/CONTRIBUTORS.md | 1 + fs_storage_backup/readme/DESCRIPTION.md | 1 + fs_storage_backup/readme/ROADMAP.md | 1 + fs_storage_backup/readme/USAGE.md | 1 + .../static/description/index.html | 452 ++++++++++++++++++ fs_storage_backup/tests/__init__.py | 1 + fs_storage_backup/tests/test_backup.py | 58 +++ fs_storage_backup/views/fs_storage_view.xml | 35 ++ 16 files changed, 825 insertions(+) create mode 100644 fs_storage_backup/README.rst create mode 100644 fs_storage_backup/__init__.py create mode 100644 fs_storage_backup/__manifest__.py create mode 100644 fs_storage_backup/data/ir_cron_data.xml create mode 100644 fs_storage_backup/data/mail_message_subtype_data.xml create mode 100644 fs_storage_backup/models/__init__.py create mode 100644 fs_storage_backup/models/fs_storage.py create mode 100644 fs_storage_backup/readme/CONFIGURE.md create mode 100644 fs_storage_backup/readme/CONTRIBUTORS.md create mode 100644 fs_storage_backup/readme/DESCRIPTION.md create mode 100644 fs_storage_backup/readme/ROADMAP.md create mode 100644 fs_storage_backup/readme/USAGE.md create mode 100644 fs_storage_backup/static/description/index.html create mode 100644 fs_storage_backup/tests/__init__.py create mode 100644 fs_storage_backup/tests/test_backup.py create mode 100644 fs_storage_backup/views/fs_storage_view.xml diff --git a/fs_storage_backup/README.rst b/fs_storage_backup/README.rst new file mode 100644 index 0000000000..319f2c8f33 --- /dev/null +++ b/fs_storage_backup/README.rst @@ -0,0 +1,103 @@ +========================= +Filesystem Storage Backup +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:58d2fd55ddd0a80685cbd1df4e905793535d2214d39e43e8922b582888e61763 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstorage-lightgray.png?logo=github + :target: https://github.com/OCA/storage/tree/16.0/fs_storage_backup + :alt: OCA/storage +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage_backup + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +With this module you can configure one or more database backup +locations. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +1. Go to Settings > Technical > FS Storage > FS Storage +2. Select a filesystem you want to use for backups. **NOTE: Make sure + you don't use the filestore as backup location otherwise it's + possible you'll back up the backup** +3. Enable ``Use For Backups`` +4. Follow it (using the chatter) if you want to get notified when a + backup fails +5. To know if the backup is working correctly you can run the scheduled + action (``Backup database and delete old backups``) manually to test + it. + +Usage +===== + +The backup is done automatically by a scheduled action +(``Backup database and delete old backups``). + +Known issues / Roadmap +====================== + +- **Configurable backup frequency**: e.g. backup every 7 days in s3 and + every 4 hours on a FTP server. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Onestein + +Contributors +------------ + +- Dennis Sluijk d.sluijk@onestein.nl (https://onestein.nl) + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/storage `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fs_storage_backup/__init__.py b/fs_storage_backup/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/fs_storage_backup/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/fs_storage_backup/__manifest__.py b/fs_storage_backup/__manifest__.py new file mode 100644 index 0000000000..7b5a0bc64a --- /dev/null +++ b/fs_storage_backup/__manifest__.py @@ -0,0 +1,14 @@ +{ + "name": "Filesystem Storage Backup", + "category": "Technical", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "Onestein, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/storage", + "depends": ["fs_storage", "mail"], + "data": [ + "data/ir_cron_data.xml", + "data/mail_message_subtype_data.xml", + "views/fs_storage_view.xml", + ], +} diff --git a/fs_storage_backup/data/ir_cron_data.xml b/fs_storage_backup/data/ir_cron_data.xml new file mode 100644 index 0000000000..c343f1f3ed --- /dev/null +++ b/fs_storage_backup/data/ir_cron_data.xml @@ -0,0 +1,18 @@ + + + + Backup database and delete old backups + 1 + days + -1 + True + + + code + model.cron_backup_db() + + + diff --git a/fs_storage_backup/data/mail_message_subtype_data.xml b/fs_storage_backup/data/mail_message_subtype_data.xml new file mode 100644 index 0000000000..e56ff2c210 --- /dev/null +++ b/fs_storage_backup/data/mail_message_subtype_data.xml @@ -0,0 +1,15 @@ + + + + Backup Failed + Backup failed + fs.storage + + + + Backup Cleanup Failed + Failed to clean up old backups + fs.storage + + + diff --git a/fs_storage_backup/models/__init__.py b/fs_storage_backup/models/__init__.py new file mode 100644 index 0000000000..349bb0495a --- /dev/null +++ b/fs_storage_backup/models/__init__.py @@ -0,0 +1 @@ +from . import fs_storage diff --git a/fs_storage_backup/models/fs_storage.py b/fs_storage_backup/models/fs_storage.py new file mode 100644 index 0000000000..8a4dcccbfe --- /dev/null +++ b/fs_storage_backup/models/fs_storage.py @@ -0,0 +1,116 @@ +import logging +import traceback +from datetime import timedelta, timezone +from os import path + +from odoo import _, api, fields, models, tools +from odoo.exceptions import ValidationError +from odoo.service import db + +_logger = logging.getLogger(__name__) + + +class FSStorage(models.Model): + _name = "fs.storage" + _inherit = ["fs.storage", "mail.thread"] # Use queue_job_cron instead? + + use_for_backup = fields.Boolean(string="Use For Backups") + backup_include_filestore = fields.Boolean( + string="Include Filestore In Backup", + ) + backup_filename_format = fields.Char( + string="Backup Filename", default="backup-%(db)s-%(dt)s.%(ext)s" + ) + backup_keep_time = fields.Integer(string="Keep backups of (in days)", default=7) + backup_dir = fields.Char(string="Backup Directory", default="backups") + + @property + def _server_env_fields(self): + env_fields = super()._server_env_fields + env_fields.update( + { + "use_for_backup": {}, + "backup_include_filestore": {}, + "backup_filename_format": {"no_default_field": False}, + "backup_keep_time": {"no_default_field": False}, + "backup_dir": {"no_default_field": False}, + } + ) + return env_fields + + @api.constrains("backup_keep_time") + def _constrain_backup_keep_time(self): + if self.backup_keep_time < 1: + raise ValidationError( + _("Keep backups of (in days) must be greater or than 0.") + ) + + def _get_backup_format(self): + self.ensure_one() + return self.backup_include_filestore and "zip" or "dump" + + def _get_backup_path(self): + self.ensure_one() + file_ext = self._get_backup_format() + current_datetime = fields.Datetime.now().strftime("%Y%m%d%H%M%S") + return path.join( + self.backup_dir, + self.backup_filename_format + % {"db": self.env.cr.dbname, "dt": current_datetime, "ext": file_ext}, + ) + + def backup_db(self): + self.ensure_one() + try: + backup_path = self._get_backup_path() + self.fs.makedirs(self.backup_dir, exist_ok=True) + if self.fs.exists(backup_path): + raise Exception("File already exists (%s)." % backup_path) + backup_file = self.fs.open(backup_path, "w") + list_db = tools.config["list_db"] + if not list_db: + tools.config["list_db"] = True + db.dump_db( + self.env.cr.dbname, + backup_file.buffer, + backup_format=self._get_backup_format(), + ) + tools.config["list_db"] = list_db + except Exception as e: + _logger.exception("Database backup failed: %s", e) + self.message_post( + subject=_("Database backup failed"), + body="
%s
" % tools.html_escape(traceback.format_exc()), + subtype_id=self.env.ref( + "fs_storage_backup.message_subtype_backup_failed" + ).id, + ) + + def cleanup_old_backups(self): + self.ensure_one() + expiry_date = fields.Datetime.now() - timedelta(days=self.backup_keep_time) + try: + files = self.fs.ls(self.backup_dir, detail=False) + for file_path in files: + file_dt = self.fs.modified(file_path) + file_dt = file_dt.astimezone(timezone.utc) + file_dt = file_dt.replace(tzinfo=None) + if file_dt < expiry_date: + self.fs.rm(file_path) + except Exception as e: + _logger.exception("Failed to clean up old backups: %s", e) + self.message_post( + subject=_("Failed to clean up old backups"), + body="
%s
" % tools.html_escape(traceback.format_exc()), + subtype_id=self.env.ref( + "fs_storage_backup.message_subtype_cleanup_failed" + ).id, + ) + + @api.model + def cron_backup_db(self): + # use_for_backup is not searchable + storages = self.search([]) + for storage in storages.filtered(lambda s: s.use_for_backup): + storage.backup_db() + storage.cleanup_old_backups() diff --git a/fs_storage_backup/readme/CONFIGURE.md b/fs_storage_backup/readme/CONFIGURE.md new file mode 100644 index 0000000000..8d674feed7 --- /dev/null +++ b/fs_storage_backup/readme/CONFIGURE.md @@ -0,0 +1,7 @@ +1. Go to Settings > Technical > FS Storage > FS Storage +2. Select a filesystem you want to use for backups. + **NOTE: Make sure you don't use the filestore as backup location otherwise it's possible you'll back up the backup** +3. Enable `Use For Backups` +4. Follow it (using the chatter) if you want to get notified when a backup fails +5. To know if the backup is working correctly you can run the scheduled action + (`Backup database and delete old backups`) manually to test it. diff --git a/fs_storage_backup/readme/CONTRIBUTORS.md b/fs_storage_backup/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..8a94e6002f --- /dev/null +++ b/fs_storage_backup/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Dennis Sluijk (https://onestein.nl) diff --git a/fs_storage_backup/readme/DESCRIPTION.md b/fs_storage_backup/readme/DESCRIPTION.md new file mode 100644 index 0000000000..25f1c1b1fa --- /dev/null +++ b/fs_storage_backup/readme/DESCRIPTION.md @@ -0,0 +1 @@ +With this module you can configure one or more database backup locations. \ No newline at end of file diff --git a/fs_storage_backup/readme/ROADMAP.md b/fs_storage_backup/readme/ROADMAP.md new file mode 100644 index 0000000000..9727d47a68 --- /dev/null +++ b/fs_storage_backup/readme/ROADMAP.md @@ -0,0 +1 @@ +- **Configurable backup frequency**: e.g. backup every 7 days in s3 and every 4 hours on a FTP server. \ No newline at end of file diff --git a/fs_storage_backup/readme/USAGE.md b/fs_storage_backup/readme/USAGE.md new file mode 100644 index 0000000000..be546dce1e --- /dev/null +++ b/fs_storage_backup/readme/USAGE.md @@ -0,0 +1 @@ +The backup is done automatically by a scheduled action (`Backup database and delete old backups`). \ No newline at end of file diff --git a/fs_storage_backup/static/description/index.html b/fs_storage_backup/static/description/index.html new file mode 100644 index 0000000000..a53df4721d --- /dev/null +++ b/fs_storage_backup/static/description/index.html @@ -0,0 +1,452 @@ + + + + + + +Filesystem Storage Backup + + + +
+

Filesystem Storage Backup

+ + +

Beta License: AGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

+

With this module you can configure one or more database backup +locations.

+

Table of contents

+ +
+

Configuration

+
    +
  1. Go to Settings > Technical > FS Storage > FS Storage
  2. +
  3. Select a filesystem you want to use for backups. NOTE: Make sure +you don’t use the filestore as backup location otherwise it’s +possible you’ll back up the backup
  4. +
  5. Enable Use For Backups
  6. +
  7. Follow it (using the chatter) if you want to get notified when a +backup fails
  8. +
  9. To know if the backup is working correctly you can run the scheduled +action (Backup database and delete old backups) manually to test +it.
  10. +
+
+
+

Usage

+

The backup is done automatically by a scheduled action +(Backup database and delete old backups).

+
+
+

Known issues / Roadmap

+
    +
  • Configurable backup frequency: e.g. backup every 7 days in s3 and +every 4 hours on a FTP server.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Onestein
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/storage project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/fs_storage_backup/tests/__init__.py b/fs_storage_backup/tests/__init__.py new file mode 100644 index 0000000000..8b6238c52d --- /dev/null +++ b/fs_storage_backup/tests/__init__.py @@ -0,0 +1 @@ +from . import test_backup diff --git a/fs_storage_backup/tests/test_backup.py b/fs_storage_backup/tests/test_backup.py new file mode 100644 index 0000000000..b6662dafd1 --- /dev/null +++ b/fs_storage_backup/tests/test_backup.py @@ -0,0 +1,58 @@ +from odoo.tests.common import TransactionCase + + +class TestBackup(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.fs_storage = cls.env.ref("fs_storage.default_fs_storage") + cls.fs_storage.use_for_backup = True + cls.fs_storage.backup_dir = "backups" + cls.fs_storage.backup_filename_format = "backup-%(db)s-%(dt)s.%(ext)s" + cls.fs_storage.backup_keep_time = 7 + + def test_with_filestore(self): + self.fs_storage.backup_include_filestore = True + old_counts = {} + for fs_storage in self.env["fs.storage"].search( + [("use_for_backup", "=", True)] + ): + fs_storage.fs.makedirs(fs_storage.backup_dir, exist_ok=True) + old_counts[fs_storage.id] = len( + fs_storage.fs.ls(fs_storage.backup_dir, detail=False) + ) + self.env["fs.storage"].cron_backup_db() # Backup all locations + for fs_storage in self.env["fs.storage"].search( + [("use_for_backup", "=", True)] + ): + new_count = len(fs_storage.fs.ls(fs_storage.backup_dir, detail=False)) + self.assertEqual(old_counts[fs_storage.id] + 1, new_count) + + def test_without_filestore(self): + self.fs_storage.fs.makedirs(self.fs_storage.backup_dir, exist_ok=True) + files = self.fs_storage.fs.ls(self.fs_storage.backup_dir, detail=False) + old_count = len(list(filter(lambda f: f.endswith(".dump"), files))) + self.fs_storage.backup_include_filestore = False + self.fs_storage.backup_db() + files = self.fs_storage.fs.ls(self.fs_storage.backup_dir, detail=False) + new_count = len(list(filter(lambda f: f.endswith(".dump"), files))) + self.assertEqual(old_count + 1, new_count) + + def test_cleanup_no_dir(self): + self.fs_storage.backup_dir = "backups123" + with self.assertLogs(level="ERROR"): + self.fs_storage.cleanup_old_backups() + + def test_no_connection(self): + fs_storage = self.env["fs.storage"].create( + { + "name": "FTP", + "code": "ftp", + "protocol": "ftp", + "directory_path": ".", + "options": '{"host": "host", "port": 21}', # Non existent host + "use_for_backup": True, + } + ) + with self.assertLogs(level="ERROR"): + fs_storage.backup_db() diff --git a/fs_storage_backup/views/fs_storage_view.xml b/fs_storage_backup/views/fs_storage_view.xml new file mode 100644 index 0000000000..398ab2f0c9 --- /dev/null +++ b/fs_storage_backup/views/fs_storage_view.xml @@ -0,0 +1,35 @@ + + + + + fs.storage + + + + + + + + + + +
+ + +
+
+
+
+
From 6f9252a0e08ab8189d58cad31d98975f19d3d28c Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 3 Apr 2025 14:12:21 +0000 Subject: [PATCH 2/8] [UPD] Update fs_storage_backup.pot --- fs_storage_backup/i18n/fs_storage_backup.pot | 177 +++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 fs_storage_backup/i18n/fs_storage_backup.pot diff --git a/fs_storage_backup/i18n/fs_storage_backup.pot b/fs_storage_backup/i18n/fs_storage_backup.pot new file mode 100644 index 0000000000..15799348b4 --- /dev/null +++ b/fs_storage_backup/i18n/fs_storage_backup.pot @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_storage_backup +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction +msgid "Action Needed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_attachment_count +msgid "Attachment Count" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,name:fs_storage_backup.message_subtype_cleanup_failed +msgid "Backup Cleanup Failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_dir +msgid "Backup Directory" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,name:fs_storage_backup.message_subtype_backup_failed +msgid "Backup Failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_filename_format +msgid "Backup Filename" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.actions.server,name:fs_storage_backup.cron_backup_db_ir_actions_server +#: model:ir.cron,cron_name:fs_storage_backup.cron_backup_db +msgid "Backup database and delete old backups" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,description:fs_storage_backup.message_subtype_backup_failed +msgid "Backup failed" +msgstr "" + +#. module: fs_storage_backup +#: model_terms:ir.ui.view,arch_db:fs_storage_backup.fs_storage_form_view +msgid "Backups" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#, python-format +msgid "Database backup failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model,name:fs_storage_backup.model_fs_storage +msgid "FS Storage" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#: model:mail.message.subtype,description:fs_storage_backup.message_subtype_cleanup_failed +#, python-format +msgid "Failed to clean up old backups" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_follower_ids +msgid "Followers" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_partner_ids +msgid "Followers (Partners)" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__has_message +msgid "Has Message" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction +msgid "If checked, new messages require your attention." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error +msgid "If checked, some messages have a delivery error." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_include_filestore +msgid "Include Filestore In Backup" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_is_follower +msgid "Is Follower" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_keep_time +msgid "Keep backups of (in days)" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#, python-format +msgid "Keep backups of (in days) must be greater or than 0." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_main_attachment_id +msgid "Main Attachment" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error +msgid "Message Delivery error" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_ids +msgid "Messages" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction_counter +msgid "Number of Actions" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error_counter +msgid "Number of errors" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction_counter +msgid "Number of messages requiring action" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__use_for_backup +msgid "Use For Backups" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__website_message_ids +msgid "Website Messages" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__website_message_ids +msgid "Website communication history" +msgstr "" From bda7da78327ee4eecd85ea970ffcd7213ade84e9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 3 Apr 2025 14:15:13 +0000 Subject: [PATCH 3/8] [BOT] post-merge updates --- fs_storage_backup/README.rst | 8 ++++---- fs_storage_backup/__manifest__.py | 2 +- fs_storage_backup/static/description/icon.png | Bin 0 -> 10254 bytes fs_storage_backup/static/description/index.html | 14 ++++++++------ 4 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 fs_storage_backup/static/description/icon.png diff --git a/fs_storage_backup/README.rst b/fs_storage_backup/README.rst index 319f2c8f33..0e1f8b9463 100644 --- a/fs_storage_backup/README.rst +++ b/fs_storage_backup/README.rst @@ -7,7 +7,7 @@ Filesystem Storage Backup !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:58d2fd55ddd0a80685cbd1df4e905793535d2214d39e43e8922b582888e61763 + !! source digest: sha256:3292ef4f97f5dcf8a5364cba204599da2169dd30020b9b488ddb72885f85f85b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -59,8 +59,8 @@ The backup is done automatically by a scheduled action Known issues / Roadmap ====================== -- **Configurable backup frequency**: e.g. backup every 7 days in s3 and - every 4 hours on a FTP server. +- **Configurable backup frequency**: e.g. backup every 7 days in s3 and + every 4 hours on a FTP server. Bug Tracker =========== @@ -83,7 +83,7 @@ Authors Contributors ------------ -- Dennis Sluijk d.sluijk@onestein.nl (https://onestein.nl) +- Dennis Sluijk d.sluijk@onestein.nl (https://onestein.nl) Maintainers ----------- diff --git a/fs_storage_backup/__manifest__.py b/fs_storage_backup/__manifest__.py index 7b5a0bc64a..4f1acec351 100644 --- a/fs_storage_backup/__manifest__.py +++ b/fs_storage_backup/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Filesystem Storage Backup", "category": "Technical", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "license": "AGPL-3", "author": "Onestein, Odoo Community Association (OCA)", "website": "https://github.com/OCA/storage", diff --git a/fs_storage_backup/static/description/icon.png b/fs_storage_backup/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1dcc49c24f364e9adf0afbc6fc0bac6dbecdeb11 GIT binary patch literal 10254 zcmbt)WmufcvhH9Zc!C8B?l8#UE&&o;gF7=g3=D(IAOS+K1lK^25Zv7%L4sRw_uvvF z*qyAk?>c**=lnR&y+1yw{;I3Hy6Ua2{<d0kcR+VvBo; zA_X`>;1;xAPL9rQqFxd#f5{a^zW*uaW+r3+U{|fRunu`GZhy$X z8_|Zi{z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Qo^cBbDHd{YajkzNxttQW>ST<^ z2~^xhB_y1sjIF5;xchvCn{QVugIE2eYZDZ!-Y-4lJdb34*k({@M zJ5!9Di^||~(IZ4iOoAbtggao+CaYvJynmB^;4r-tY2gS_*P!?U?hlEX;l+^*{%B2n z)|1j9wOHQQ^5Xha>{Cu8_w^8=#6;Dz7kU~RgTqn;ynDm6{xdlkf2vk0UK^oS3yVy4 zE+v&qnlYtPHBk#X&2}r7`@K`J@^e~Qm?iRJ*tbAaZDZTmB&mWMkZp7Kj7^kth#_uX z5z>gC(8Xz|Ie(+#&wiF3;Aey|Db(R*-U)!6;l_5@u?-$>j0SgEl5+c}Lfe-$p-dFH zB_$bC<)x6#A_2Uuo8=^l1@}vK!gvbF#b&MoH8ac3xMxUz$LFb8KU(x$YhtHanM_sw zYOFMBX2iNNSe&a}!;G9nv(tsW4@%3iQcqczOCF*JOBQ@4Orw=o?_vc(9$hfO`>U6& zyY_CUa9pASiJpmv`@oR!k;&$`h8!)$uS=}d-fPddfIdMDUW@%3y1LI(1Q=e$)sz(QC*E;Nfl99YTgk+|@jl`+iF?<_D?4YqV0Zl)lO8YWC@1ZWW^mi{5ePQN<~FQ2NMG$|K{py5akJa zkezmqhN)>MGMp$7=sOo2(7ppv``dCIwf&MaQQis7S596kkiw8Do(jO?EY4iJ4Hec6 z4Hymzu`w)cI9Pbq6GPtTP)x&Lmk;FT=ZCB4>(5}c0?;2l`p&?>&<;2(P8a3lOTNP# zdEzF5qDpkRR&PZC&cS{7xD@qV;(g5X%xI?m$9Q @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -367,7 +367,7 @@

Filesystem Storage Backup

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:58d2fd55ddd0a80685cbd1df4e905793535d2214d39e43e8922b582888e61763 +!! source digest: sha256:3292ef4f97f5dcf8a5364cba204599da2169dd30020b9b488ddb72885f85f85b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

With this module you can configure one or more database backup @@ -439,7 +439,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

From 53b38cc922f9af83d641c6a76de0cabf1eec6e0d Mon Sep 17 00:00:00 2001 From: mymage Date: Sat, 5 Apr 2025 13:49:22 +0000 Subject: [PATCH 4/8] Added translation using Weblate (Italian) --- fs_storage_backup/i18n/it.po | 178 +++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 fs_storage_backup/i18n/it.po diff --git a/fs_storage_backup/i18n/it.po b/fs_storage_backup/i18n/it.po new file mode 100644 index 0000000000..e571d295b1 --- /dev/null +++ b/fs_storage_backup/i18n/it.po @@ -0,0 +1,178 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fs_storage_backup +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction +msgid "Action Needed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_attachment_count +msgid "Attachment Count" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,name:fs_storage_backup.message_subtype_cleanup_failed +msgid "Backup Cleanup Failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_dir +msgid "Backup Directory" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,name:fs_storage_backup.message_subtype_backup_failed +msgid "Backup Failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_filename_format +msgid "Backup Filename" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.actions.server,name:fs_storage_backup.cron_backup_db_ir_actions_server +#: model:ir.cron,cron_name:fs_storage_backup.cron_backup_db +msgid "Backup database and delete old backups" +msgstr "" + +#. module: fs_storage_backup +#: model:mail.message.subtype,description:fs_storage_backup.message_subtype_backup_failed +msgid "Backup failed" +msgstr "" + +#. module: fs_storage_backup +#: model_terms:ir.ui.view,arch_db:fs_storage_backup.fs_storage_form_view +msgid "Backups" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#, python-format +msgid "Database backup failed" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model,name:fs_storage_backup.model_fs_storage +msgid "FS Storage" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#: model:mail.message.subtype,description:fs_storage_backup.message_subtype_cleanup_failed +#, python-format +msgid "Failed to clean up old backups" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_follower_ids +msgid "Followers" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_partner_ids +msgid "Followers (Partners)" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__has_message +msgid "Has Message" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction +msgid "If checked, new messages require your attention." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error +msgid "If checked, some messages have a delivery error." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_include_filestore +msgid "Include Filestore In Backup" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_is_follower +msgid "Is Follower" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_keep_time +msgid "Keep backups of (in days)" +msgstr "" + +#. module: fs_storage_backup +#. odoo-python +#: code:addons/fs_storage_backup/models/fs_storage.py:0 +#, python-format +msgid "Keep backups of (in days) must be greater or than 0." +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_main_attachment_id +msgid "Main Attachment" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error +msgid "Message Delivery error" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_ids +msgid "Messages" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction_counter +msgid "Number of Actions" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error_counter +msgid "Number of errors" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction_counter +msgid "Number of messages requiring action" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__use_for_backup +msgid "Use For Backups" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__website_message_ids +msgid "Website Messages" +msgstr "" + +#. module: fs_storage_backup +#: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__website_message_ids +msgid "Website communication history" +msgstr "" From 22577a64002518e66782988d6b79c82984f4573a Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 20 May 2025 07:04:18 +0000 Subject: [PATCH 5/8] Translated using Weblate (Italian) Currently translated at 100.0% (31 of 31 strings) Translation: storage-16.0/storage-16.0-fs_storage_backup Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage_backup/it/ --- fs_storage_backup/i18n/it.po | 66 +++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/fs_storage_backup/i18n/it.po b/fs_storage_backup/i18n/it.po index e571d295b1..01e54aa8bb 100644 --- a/fs_storage_backup/i18n/it.po +++ b/fs_storage_backup/i18n/it.po @@ -6,71 +6,73 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2025-05-20 09:26+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.10.4\n" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction msgid "Action Needed" -msgstr "" +msgstr "Richiesta azione" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_attachment_count msgid "Attachment Count" -msgstr "" +msgstr "Conteggio allegati" #. module: fs_storage_backup #: model:mail.message.subtype,name:fs_storage_backup.message_subtype_cleanup_failed msgid "Backup Cleanup Failed" -msgstr "" +msgstr "Pulitura backup fallita" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_dir msgid "Backup Directory" -msgstr "" +msgstr "Cartella backup" #. module: fs_storage_backup #: model:mail.message.subtype,name:fs_storage_backup.message_subtype_backup_failed msgid "Backup Failed" -msgstr "" +msgstr "Backup fallito" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_filename_format msgid "Backup Filename" -msgstr "" +msgstr "Nome file backup" #. module: fs_storage_backup #: model:ir.actions.server,name:fs_storage_backup.cron_backup_db_ir_actions_server #: model:ir.cron,cron_name:fs_storage_backup.cron_backup_db msgid "Backup database and delete old backups" -msgstr "" +msgstr "Esegui backup del database e cancella i vecchi backup" #. module: fs_storage_backup #: model:mail.message.subtype,description:fs_storage_backup.message_subtype_backup_failed msgid "Backup failed" -msgstr "" +msgstr "Backup fallito" #. module: fs_storage_backup #: model_terms:ir.ui.view,arch_db:fs_storage_backup.fs_storage_form_view msgid "Backups" -msgstr "" +msgstr "Backup" #. module: fs_storage_backup #. odoo-python #: code:addons/fs_storage_backup/models/fs_storage.py:0 #, python-format msgid "Database backup failed" -msgstr "" +msgstr "Backup del database non riuscito" #. module: fs_storage_backup #: model:ir.model,name:fs_storage_backup.model_fs_storage msgid "FS Storage" -msgstr "" +msgstr "Deposito FS" #. module: fs_storage_backup #. odoo-python @@ -78,101 +80,101 @@ msgstr "" #: model:mail.message.subtype,description:fs_storage_backup.message_subtype_cleanup_failed #, python-format msgid "Failed to clean up old backups" -msgstr "" +msgstr "Pulizia vecchi backup fallita" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_follower_ids msgid "Followers" -msgstr "" +msgstr "Seguito da" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_partner_ids msgid "Followers (Partners)" -msgstr "" +msgstr "Seguito da (partner)" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__has_message msgid "Has Message" -msgstr "" +msgstr "Ha un messaggio" #. module: fs_storage_backup #: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction msgid "If checked, new messages require your attention." -msgstr "" +msgstr "Se selezionata, nuovi messaggi richiedono attenzione." #. module: fs_storage_backup #: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error msgid "If checked, some messages have a delivery error." -msgstr "" +msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna." #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_include_filestore msgid "Include Filestore In Backup" -msgstr "" +msgstr "Includere Filestore nel backup" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_is_follower msgid "Is Follower" -msgstr "" +msgstr "Segue" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__backup_keep_time msgid "Keep backups of (in days)" -msgstr "" +msgstr "Mantenere backup per (in giorni)" #. module: fs_storage_backup #. odoo-python #: code:addons/fs_storage_backup/models/fs_storage.py:0 #, python-format msgid "Keep backups of (in days) must be greater or than 0." -msgstr "" +msgstr "Mantenere il backup per (in giorni) deve essere 0 o maggiore." #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_main_attachment_id msgid "Main Attachment" -msgstr "" +msgstr "Allegato principale" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error msgid "Message Delivery error" -msgstr "" +msgstr "Errore di consegna messaggio" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_ids msgid "Messages" -msgstr "" +msgstr "Messaggi" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction_counter msgid "Number of Actions" -msgstr "" +msgstr "Numero di azioni" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_has_error_counter msgid "Number of errors" -msgstr "" +msgstr "Numero di errori" #. module: fs_storage_backup #: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_needaction_counter msgid "Number of messages requiring action" -msgstr "" +msgstr "Numero di messaggi che richiedono un'azione" #. module: fs_storage_backup #: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__message_has_error_counter msgid "Number of messages with delivery error" -msgstr "" +msgstr "Numero di messaggi con errore di consegna" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__use_for_backup msgid "Use For Backups" -msgstr "" +msgstr "Usa per backup" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__website_message_ids msgid "Website Messages" -msgstr "" +msgstr "Messaggi sito web" #. module: fs_storage_backup #: model:ir.model.fields,help:fs_storage_backup.field_fs_storage__website_message_ids msgid "Website communication history" -msgstr "" +msgstr "Cronologia comunicazioni sito web" From f868cea8d240315f29299bd7b874ba5a59107a49 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 29 May 2025 13:50:39 +0000 Subject: [PATCH 6/8] Translated using Weblate (Italian) Currently translated at 100.0% (31 of 31 strings) Translation: storage-16.0/storage-16.0-fs_storage_backup Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage_backup/it/ --- fs_storage_backup/i18n/it.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_storage_backup/i18n/it.po b/fs_storage_backup/i18n/it.po index 01e54aa8bb..cca4374749 100644 --- a/fs_storage_backup/i18n/it.po +++ b/fs_storage_backup/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-05-20 09:26+0000\n" +"PO-Revision-Date: 2025-05-29 16:26+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -19,7 +19,7 @@ msgstr "" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_needaction msgid "Action Needed" -msgstr "Richiesta azione" +msgstr "Azione richiesta" #. module: fs_storage_backup #: model:ir.model.fields,field_description:fs_storage_backup.field_fs_storage__message_attachment_count From b316644a208d1cfe08833dee571e09c0bf18d9ae Mon Sep 17 00:00:00 2001 From: kobros-tech Date: Mon, 2 Jun 2025 17:43:21 +0300 Subject: [PATCH 7/8] [IMP] fs_storage_backup: pre-commit auto fixes --- fs_storage_backup/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fs_storage_backup/pyproject.toml diff --git a/fs_storage_backup/pyproject.toml b/fs_storage_backup/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/fs_storage_backup/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" From 64992a2287c9701bb7081a355fd40c6d5c66bc3d Mon Sep 17 00:00:00 2001 From: tarteo Date: Wed, 7 May 2025 15:20:31 +0200 Subject: [PATCH 8/8] [MIG] fs_storage_backup: Migration to 18.0 fs_storage_backup: Use body_is_html in post_message Update tests to new demo data Fixup tests --- fs_storage_backup/README.rst | 10 ++++---- fs_storage_backup/__manifest__.py | 2 +- fs_storage_backup/data/ir_cron_data.xml | 2 -- fs_storage_backup/models/fs_storage.py | 10 +++++--- .../static/description/index.html | 6 ++--- fs_storage_backup/tests/test_backup.py | 13 +++++----- fs_storage_backup/views/fs_storage_view.xml | 25 ++++--------------- 7 files changed, 26 insertions(+), 42 deletions(-) diff --git a/fs_storage_backup/README.rst b/fs_storage_backup/README.rst index 0e1f8b9463..29b792d90a 100644 --- a/fs_storage_backup/README.rst +++ b/fs_storage_backup/README.rst @@ -17,13 +17,13 @@ Filesystem Storage Backup :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstorage-lightgray.png?logo=github - :target: https://github.com/OCA/storage/tree/16.0/fs_storage_backup + :target: https://github.com/OCA/storage/tree/18.0/fs_storage_backup :alt: OCA/storage .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage_backup + :target: https://translation.odoo-community.org/projects/storage-18-0/storage-18-0-fs_storage_backup :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -68,7 +68,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -98,6 +98,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/storage `_ project on GitHub. +This module is part of the `OCA/storage `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fs_storage_backup/__manifest__.py b/fs_storage_backup/__manifest__.py index 4f1acec351..7e8ffb9a33 100644 --- a/fs_storage_backup/__manifest__.py +++ b/fs_storage_backup/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Filesystem Storage Backup", "category": "Technical", - "version": "16.0.1.0.1", + "version": "18.0.1.0.0", "license": "AGPL-3", "author": "Onestein, Odoo Community Association (OCA)", "website": "https://github.com/OCA/storage", diff --git a/fs_storage_backup/data/ir_cron_data.xml b/fs_storage_backup/data/ir_cron_data.xml index c343f1f3ed..caa841405e 100644 --- a/fs_storage_backup/data/ir_cron_data.xml +++ b/fs_storage_backup/data/ir_cron_data.xml @@ -4,9 +4,7 @@ Backup database and delete old backups 1 days - -1 True - code model.cron_backup_db() diff --git a/fs_storage_backup/models/fs_storage.py b/fs_storage_backup/models/fs_storage.py index 8a4dcccbfe..f7a26350ea 100644 --- a/fs_storage_backup/models/fs_storage.py +++ b/fs_storage_backup/models/fs_storage.py @@ -12,7 +12,7 @@ class FSStorage(models.Model): _name = "fs.storage" - _inherit = ["fs.storage", "mail.thread"] # Use queue_job_cron instead? + _inherit = ["fs.storage", "mail.thread"] use_for_backup = fields.Boolean(string="Use For Backups") backup_include_filestore = fields.Boolean( @@ -65,7 +65,7 @@ def backup_db(self): backup_path = self._get_backup_path() self.fs.makedirs(self.backup_dir, exist_ok=True) if self.fs.exists(backup_path): - raise Exception("File already exists (%s)." % backup_path) + raise Exception(f"File already exists ({backup_path}).") backup_file = self.fs.open(backup_path, "w") list_db = tools.config["list_db"] if not list_db: @@ -80,7 +80,8 @@ def backup_db(self): _logger.exception("Database backup failed: %s", e) self.message_post( subject=_("Database backup failed"), - body="
%s
" % tools.html_escape(traceback.format_exc()), + body=f"
{tools.html_escape(traceback.format_exc())}
", + body_is_html=True, subtype_id=self.env.ref( "fs_storage_backup.message_subtype_backup_failed" ).id, @@ -101,7 +102,8 @@ def cleanup_old_backups(self): _logger.exception("Failed to clean up old backups: %s", e) self.message_post( subject=_("Failed to clean up old backups"), - body="
%s
" % tools.html_escape(traceback.format_exc()), + body=f"
{tools.html_escape(traceback.format_exc())}
", + body_is_html=True, subtype_id=self.env.ref( "fs_storage_backup.message_subtype_cleanup_failed" ).id, diff --git a/fs_storage_backup/static/description/index.html b/fs_storage_backup/static/description/index.html index e526d670f9..81453ac1df 100644 --- a/fs_storage_backup/static/description/index.html +++ b/fs_storage_backup/static/description/index.html @@ -369,7 +369,7 @@

Filesystem Storage Backup

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:3292ef4f97f5dcf8a5364cba204599da2169dd30020b9b488ddb72885f85f85b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

With this module you can configure one or more database backup locations.

Table of contents

@@ -419,7 +419,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -445,7 +445,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/storage project on GitHub.

+

This module is part of the OCA/storage project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/fs_storage_backup/tests/test_backup.py b/fs_storage_backup/tests/test_backup.py index b6662dafd1..c6321ac238 100644 --- a/fs_storage_backup/tests/test_backup.py +++ b/fs_storage_backup/tests/test_backup.py @@ -5,7 +5,7 @@ class TestBackup(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() - cls.fs_storage = cls.env.ref("fs_storage.default_fs_storage") + cls.fs_storage = cls.env.ref("fs_storage.fs_storage_demo") cls.fs_storage.use_for_backup = True cls.fs_storage.backup_dir = "backups" cls.fs_storage.backup_filename_format = "backup-%(db)s-%(dt)s.%(ext)s" @@ -14,17 +14,16 @@ def setUpClass(cls): def test_with_filestore(self): self.fs_storage.backup_include_filestore = True old_counts = {} - for fs_storage in self.env["fs.storage"].search( - [("use_for_backup", "=", True)] - ): + backup_locations = ( + self.env["fs.storage"].search([]).filtered(lambda r: r.use_for_backup) + ) + for fs_storage in backup_locations: fs_storage.fs.makedirs(fs_storage.backup_dir, exist_ok=True) old_counts[fs_storage.id] = len( fs_storage.fs.ls(fs_storage.backup_dir, detail=False) ) self.env["fs.storage"].cron_backup_db() # Backup all locations - for fs_storage in self.env["fs.storage"].search( - [("use_for_backup", "=", True)] - ): + for fs_storage in backup_locations: new_count = len(fs_storage.fs.ls(fs_storage.backup_dir, detail=False)) self.assertEqual(old_counts[fs_storage.id] + 1, new_count) diff --git a/fs_storage_backup/views/fs_storage_view.xml b/fs_storage_backup/views/fs_storage_view.xml index 398ab2f0c9..d0e7994bec 100644 --- a/fs_storage_backup/views/fs_storage_view.xml +++ b/fs_storage_backup/views/fs_storage_view.xml @@ -7,28 +7,13 @@ - - - - + + + + -
- - -
+