Skip to content

Commit 944620c

Browse files
authored
[MIG] [17.0] auto_backup
OCA#2752
1 parent 30281d3 commit 944620c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+34720
-0
lines changed

auto_backup/README.rst

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
====================
2+
Database Auto-Backup
3+
====================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:163fe86803c25bd1647c8a149b89b15db756b9f3551c73e29bc93c5d1d31a2ee
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
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/16.0/auto_backup
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-16-0/server-tools-16-0-auto_backup
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=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
A tool for all your back-ups, internal and external!
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Installation
39+
============
40+
41+
Before installing this module, you need to execute::
42+
43+
pip3 install pysftp==0.2.9
44+
45+
Configuration
46+
=============
47+
48+
Go to *Settings -> Database Structure -> Automated Backup* to
49+
create your configurations for each database that you needed
50+
to backups.
51+
52+
Usage
53+
=====
54+
55+
Keep your Odoo data safe with this module. Take automated back-ups,
56+
remove them automatically and even write them to an external server
57+
through an encrypted tunnel. You can even specify how long local backups
58+
and external backups should be kept, automatically!
59+
60+
Connect with an FTP Server
61+
~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
63+
Keep your data safe, through an SSH tunnel!
64+
-------------------------------------------
65+
66+
Want to go even further and write your backups to an external server?
67+
You can with this module! Specify the credentials to the server, specify
68+
a path and everything will be backed up automatically. This is done
69+
through an SSH (encrypted) tunnel, thanks to pysftp, so your data is
70+
safe!
71+
72+
Test connection
73+
~~~~~~~~~~~~~~~
74+
75+
Checks your credentials in one click
76+
------------------------------------
77+
78+
Want to make sure if the connection details are correct and if Odoo can
79+
automatically write them to the remote server? Simply click on the ‘Test
80+
SFTP Connection’ button and you will get message telling you if
81+
everything is OK, or what is wrong!
82+
83+
E-mail on backup failure
84+
~~~~~~~~~~~~~~~~~~~~~~~~
85+
86+
Stay informed of problems, automatically!
87+
-----------------------------------------
88+
89+
Do you want to know if the database backup succeeded or failed? Subscribe to
90+
the corresponding backup setting notification type.
91+
92+
Run backups when you want
93+
~~~~~~~~~~~~~~~~~~~~~~~~~
94+
95+
From the backups configuration list, press *More > Execute backup(s)* to
96+
manually execute the selected processes.
97+
98+
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
99+
:alt: Try me on Runbot
100+
:target: https://runbot.odoo-community.org/runbot/149/11.0
101+
102+
Known issues / Roadmap
103+
======================
104+
105+
* On larger databases, it is possible that backups will die due to Odoo server
106+
settings. In order to circumvent this without frivolously changing settings,
107+
you need to run the backup from outside of the main Odoo instance. How to do
108+
this is outlined in `this blog post
109+
<https://blog.laslabs.com/2016/10/running-python-scripts-within-odoos-environment/>`_.
110+
* Backups won't work if list_db=False is configured in the instance.
111+
112+
Bug Tracker
113+
===========
114+
115+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
116+
In case of trouble, please check there if your issue has already been reported.
117+
If you spotted it first, help us to smash it by providing a detailed and welcomed
118+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auto_backup%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
119+
120+
Do not contact contributors directly about support or help with technical issues.
121+
122+
Credits
123+
=======
124+
125+
Authors
126+
~~~~~~~
127+
128+
* Yenthe Van Ginneken
129+
* Agile Business Group
130+
* Grupo ESOC Ingenieria de Servicios
131+
* LasLabs
132+
* AdaptiveCity
133+
134+
Contributors
135+
~~~~~~~~~~~~
136+
137+
* Yenthe Van Ginneken <[email protected]>
138+
* Alessio Gerace <[email protected]>
139+
* Jairo Llopis <[email protected]>
140+
* Dave Lasley <[email protected]>
141+
* Andrea Stirpe <[email protected]>
142+
* Aitor Bouzas <[email protected]>
143+
* Simone Vanin <[email protected]>
144+
* Vu Nguyen Anh <[email protected]>
145+
* Alex Comba <[email protected]>
146+
147+
Maintainers
148+
~~~~~~~~~~~
149+
150+
This module is maintained by the OCA.
151+
152+
.. image:: https://odoo-community.org/logo.png
153+
:alt: Odoo Community Association
154+
:target: https://odoo-community.org
155+
156+
OCA, or the Odoo Community Association, is a nonprofit organization whose
157+
mission is to support the collaborative development of Odoo features and
158+
promote its widespread use.
159+
160+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/16.0/auto_backup>`_ project on GitHub.
161+
162+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

auto_backup/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models

auto_backup/__manifest__.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
2+
# Copyright 2015 Agile Business Group <http://www.agilebg.com>
3+
# Copyright 2016 Grupo ESOC Ingenieria de Servicios, S.L.U. - Jairo Llopis
4+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
5+
6+
{
7+
"name": "Database Auto-Backup",
8+
"summary": "Backups database",
9+
"version": "17.0.1.0.0",
10+
"author": "Yenthe Van Ginneken, "
11+
"Agile Business Group, "
12+
"Grupo ESOC Ingenieria de Servicios, "
13+
"LasLabs, "
14+
"AdaptiveCity, "
15+
"Odoo Community Association (OCA)",
16+
"license": "AGPL-3",
17+
"website": "https://github.com/OCA/server-tools",
18+
"category": "Tools",
19+
"depends": ["mail"],
20+
"data": [
21+
"data/ir_cron.xml",
22+
"data/mail_message_subtype.xml",
23+
"security/ir.model.access.csv",
24+
"view/db_backup_view.xml",
25+
],
26+
"installable": True,
27+
"external_dependencies": {"python": ["pysftp", "cryptography"]},
28+
}
169 Bytes
Binary file not shown.

auto_backup/data/ir_cron.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="ir_cron_backup_scheduler_0" model="ir.cron">
4+
<field name="name">Backup Scheduler</field>
5+
<field name="user_id" ref="base.user_root" />
6+
<field name="interval_number">1</field>
7+
<field name="interval_type">days</field>
8+
<field name="numbercall">-1</field>
9+
<field
10+
name="nextcall"
11+
eval="(datetime.now() + timedelta(days=1)).strftime('%Y-%m-%d 03:00:00')"
12+
/>
13+
<field name="model_id" ref="model_db_backup" />
14+
<field name="state">code</field>
15+
<field name="code">model.action_backup_all()</field>
16+
</record>
17+
</odoo>
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="mail_message_subtype_success" model="mail.message.subtype">
4+
<field name="name">Backup Successful</field>
5+
<field name="description">Database backup succeeded.</field>
6+
<field name="res_model">db.backup</field>
7+
<field name="default" eval="False" />
8+
</record>
9+
<record id="mail_message_subtype_failure" model="mail.message.subtype">
10+
<field name="name">Backup Failed</field>
11+
<field name="description">Database backup failed.</field>
12+
<field name="res_model">db.backup</field>
13+
<field name="default" eval="True" />
14+
</record>
15+
</odoo>

0 commit comments

Comments
 (0)