|
| 1 | +=================== |
| 2 | +Auto Backup Fs File |
| 3 | +=================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:0b8048c71fd406f44c43adaa9fc156284a3b2ed3a70c0a026e7245ef182cc23d |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Alpha |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/server-tools/tree/17.0/auto_backup_fs_file |
| 21 | + :alt: OCA/server-tools |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-auto_backup_fs_file |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module enhances the database backup functionality in Odoo by |
| 32 | +introducing support for storing backups as files using the ``fsspec`` |
| 33 | +library. It is designed to address the need for reliable and flexible |
| 34 | +backup solutions, enabling businesses to safeguard their data by storing |
| 35 | +backups on various filesystems, including cloud storage providers, |
| 36 | +network drives, and local secure storage. |
| 37 | + |
| 38 | +By integrating with the ``fs_file`` addon from the OCA storage |
| 39 | +repository, this module allows users to automate the backup process and |
| 40 | +store the resulting files in a configured filesystem. It provides an |
| 41 | +easy-to-use interface for configuring backup methods, managing stored |
| 42 | +backups, and ensuring data integrity for disaster recovery or |
| 43 | +multi-environment setups. |
| 44 | + |
| 45 | +.. IMPORTANT:: |
| 46 | + This is an alpha version, the data model and design can change at any time without warning. |
| 47 | + Only for development or testing purpose, do not use in production. |
| 48 | + `More details on development status <https://odoo-community.org/page/development-status>`_ |
| 49 | + |
| 50 | +**Table of contents** |
| 51 | + |
| 52 | +.. contents:: |
| 53 | + :local: |
| 54 | + |
| 55 | +Use Cases / Context |
| 56 | +=================== |
| 57 | + |
| 58 | +BUSINESS NEED: This module addresses the critical need for safeguarding |
| 59 | +Odoo instance data by enabling automated backups to a filesystem |
| 60 | +supported by the ``fsspec`` library. Businesses often require reliable |
| 61 | +and accessible backup solutions to ensure data integrity and recovery in |
| 62 | +case of system failures or data loss. This module is particularly useful |
| 63 | +in contexts where organizations need to store backups on cloud storage, |
| 64 | +network drives, or other custom filesystems supported by ``fsspec``. |
| 65 | + |
| 66 | +Practical examples include: |
| 67 | + |
| 68 | +- Backing up Odoo data to cloud storage providers like AWS S3, Google |
| 69 | + Cloud Storage, or Azure Blob Storage. |
| 70 | +- Storing backups on a secure local or remote filesystem for disaster |
| 71 | + recovery purposes. |
| 72 | +- Automating backup processes in multi-environment setups, such as |
| 73 | + multi-company or multi-website configurations. |
| 74 | + |
| 75 | +APPROACH: The module extends the backup functionality from the |
| 76 | +``auto_backup`` module by introducing a method that allows storing the |
| 77 | +resulting backup using an ``fsspec`` implementation. This is achieved |
| 78 | +through the integration of the ``fs_file`` from `storage |
| 79 | +repository <https://github.com/OCA/storage>`__. The module leverages the |
| 80 | +``fsspec`` library to provide a flexible and extensible interface for |
| 81 | +interacting with various filesystems. It automates the backup process by |
| 82 | +exporting Odoo instance data and storing it in the specified filesystem. |
| 83 | +Additionally, it allows users to download the backups for local storage |
| 84 | +or further processing. |
| 85 | + |
| 86 | +USEFUL INFORMATION: |
| 87 | + |
| 88 | +- **Dependencies**: This module depends on the ``fsspec`` library, its |
| 89 | + relevant filesystem implementations, and the ``fs_file`` addon from |
| 90 | + OCA/storage. Ensure the required ``fsspec`` plugins are installed for |
| 91 | + your target filesystem. |
| 92 | + |
| 93 | +Installation |
| 94 | +============ |
| 95 | + |
| 96 | +This addon itself does not introduce any dependencies, but its |
| 97 | +dependencies may require additional packages.:wa |
| 98 | + |
| 99 | +Configuration |
| 100 | +============= |
| 101 | + |
| 102 | +1. **Review Documentation for Dependencies** Before configuring the |
| 103 | + module, ensure you have reviewed the documentation for the following |
| 104 | + modules: |
| 105 | + |
| 106 | +- ``fs_attachment`` |
| 107 | +- ``fs_storage`` These modules provide the necessary setup for file |
| 108 | + storage and attachment handling. |
| 109 | + |
| 110 | +2. **Configure File Storage** |
| 111 | + |
| 112 | +- Navigate to **Settings** > **Technical** > **FS Storage**. |
| 113 | +- Create or select an existing storage configuration. |
| 114 | +- Ensure the storage is properly set up and tested for accessibility. |
| 115 | + |
| 116 | +3. **Link Backup File field to Storage** |
| 117 | + |
| 118 | +- While configuring the file storage in **Settings** > **Technical** > |
| 119 | + **FS Storage**, ensure that the ``backup_file`` from the |
| 120 | + ``db.backup.fs.file`` model is listed under the ``Field`` field. |
| 121 | +- This step is part of the storage configuration process. |
| 122 | +- Save the changes after verifying the setup. |
| 123 | + |
| 124 | +.. image:: https://raw.githubusercontent.com/OCA/server-tools/17.0/auto_backup_fs_file/images/file_storage_configuration.png |
| 125 | + :alt: Example of File Storage Configuration |
| 126 | + |
| 127 | +4. **Verify Configuration** |
| 128 | + |
| 129 | +- Perform a test backup to ensure the files are being stored in the |
| 130 | + correct location. |
| 131 | +- Check the logs for any errors or warnings. |
| 132 | + |
| 133 | +By following these steps, you will ensure that the module is properly |
| 134 | +configured for storing backups in the desired file storage system. |
| 135 | + |
| 136 | +Usage |
| 137 | +===== |
| 138 | + |
| 139 | +This module extends the functionality of the database backup system in |
| 140 | +Odoo by introducing a new backup method: **Fs File**. This method allows |
| 141 | +storing database backups as files using an FSSPEC implementation. |
| 142 | + |
| 143 | +How to Use the Module |
| 144 | +--------------------- |
| 145 | + |
| 146 | +1. Configure the Backup Method |
| 147 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 148 | + |
| 149 | +1. Navigate to **Settings** > **Technical** > **Database Structure** > |
| 150 | + **Automated Backups**. |
| 151 | +2. Create or edit a backup configuration. |
| 152 | +3. In the **Backup Method** field, select **Fs File**. |
| 153 | +4. Configure other fields as needed, such as the backup format and |
| 154 | + retention settings. |
| 155 | +5. Save the configuration. |
| 156 | + |
| 157 | +2. Perform a Backup |
| 158 | +~~~~~~~~~~~~~~~~~~~ |
| 159 | + |
| 160 | +1. From the list of backup configurations, select the one configured |
| 161 | + with the **Fs File** method. |
| 162 | +2. Click the **Backup Now** button to initiate the backup process. |
| 163 | +3. The backup will be stored as a file in the configured FSSPEC storage. |
| 164 | + |
| 165 | +3. View Fs File Backups |
| 166 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 167 | + |
| 168 | +1. Open the backup configuration form view. |
| 169 | +2. In the top-right corner, you will see a **Backups** stat button (if |
| 170 | + backups exist). |
| 171 | +3. Click the **Backups** button to view the list of Fs File backups |
| 172 | + associated with the configuration. |
| 173 | + |
| 174 | +4. Manage Fs File Backups |
| 175 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 176 | + |
| 177 | +- In the Fs File backups list view, you can see details such as the |
| 178 | + backup filename and associated database backup configuration. |
| 179 | +- Use this view to manage or download backups as needed. |
| 180 | + |
| 181 | +Screenshots |
| 182 | +~~~~~~~~~~~ |
| 183 | + |
| 184 | +- **Backup Configuration Form View** |Backup Configuration Form| |
| 185 | + |
| 186 | +- **Fs File Backups List View** |Fs File Backups List| |
| 187 | + |
| 188 | +Notes |
| 189 | +~~~~~ |
| 190 | + |
| 191 | +- Ensure that the FSSPEC storage is properly configured before using |
| 192 | + the **Fs File** method. |
| 193 | +- This module adds a new stat button in the backup configuration form |
| 194 | + view to quickly access Fs File backups. |
| 195 | + |
| 196 | +.. |Backup Configuration Form| image:: https://raw.githubusercontent.com/OCA/server-tools/17.0/auto_backup_fs_file/static/description/db_backup_form_view.png |
| 197 | +.. |Fs File Backups List| image:: https://raw.githubusercontent.com/OCA/server-tools/17.0/auto_backup_fs_file/static/description/db_backup_fs_file_tree_view.png |
| 198 | + |
| 199 | +Bug Tracker |
| 200 | +=========== |
| 201 | + |
| 202 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. |
| 203 | +In case of trouble, please check there if your issue has already been reported. |
| 204 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 205 | +`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auto_backup_fs_file%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 206 | + |
| 207 | +Do not contact contributors directly about support or help with technical issues. |
| 208 | + |
| 209 | +Credits |
| 210 | +======= |
| 211 | + |
| 212 | +Authors |
| 213 | +------- |
| 214 | + |
| 215 | +* Binhex |
| 216 | + |
| 217 | +Contributors |
| 218 | +------------ |
| 219 | + |
| 220 | +- Rolando Pérez Rebollo r.perez@binhex.cloud |
| 221 | + |
| 222 | +Other credits |
| 223 | +------------- |
| 224 | + |
| 225 | +The development of this module has been financially supported by: |
| 226 | + |
| 227 | +- Binhex |
| 228 | + |
| 229 | +Maintainers |
| 230 | +----------- |
| 231 | + |
| 232 | +This module is maintained by the OCA. |
| 233 | + |
| 234 | +.. image:: https://odoo-community.org/logo.png |
| 235 | + :alt: Odoo Community Association |
| 236 | + :target: https://odoo-community.org |
| 237 | + |
| 238 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 239 | +mission is to support the collaborative development of Odoo features and |
| 240 | +promote its widespread use. |
| 241 | + |
| 242 | +This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/auto_backup_fs_file>`_ project on GitHub. |
| 243 | + |
| 244 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments