Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6835134
Update english pot file
Yenthe666 Mar 26, 2015
d81148f
Dutch translations
Yenthe666 Mar 26, 2015
b13a07d
Chinese translations
Yenthe666 Mar 27, 2015
52a57ea
Changes chinese translation
Yenthe666 Mar 27, 2015
baa791f
Full German translations
Yenthe666 Apr 20, 2015
fce152b
Typo fix
Yenthe666 May 7, 2015
6484f3b
Flemish translations
Yenthe666 May 11, 2015
422fe2a
Open FTP session on the last moment possible
archetipo May 11, 2015
5b3e831
Porting module to OCA 8.0
archetipo Jul 14, 2015
9129d7d
[FIX] module
archetipo Jul 14, 2015
859239b
[FIX] bug logger --> _logger call
archetipo Jul 20, 2015
dee2ee4
[FIX] Readme.rst
archetipo Jul 21, 2015
006a1e8
[FIX] defaults value
archetipo Jul 21, 2015
3cc3ef2
[FIX] rebased commit
archetipo Jul 21, 2015
9869e78
[RM] description index.html
archetipo Jul 21, 2015
634b07b
[RF] porting to new api
archetipo Jul 21, 2015
b1d853c
[FIX] test
archetipo Jul 21, 2015
b39b6ae
[FIX] flake8
archetipo Jul 21, 2015
5732f38
[IMP] deps in travis.yml
archetipo Jul 22, 2015
76f2ebe
[FIX] flake8 and pylint
archetipo Jul 22, 2015
b88f7fa
[FIX] name of file
archetipo Jul 28, 2015
c1fae69
[FIX] autoremove method
archetipo Jul 28, 2015
a38e15c
[FIX] mail.tempale seems not work in cron task, replaced with direct…
archetipo Jul 28, 2015
dd564d1
[FIX] Readme
archetipo Jul 28, 2015
37bf876
[FIX] review remarks
archetipo Sep 2, 2015
36e8c37
[FIX] handled ssl hosts
archetipo Sep 2, 2015
9f42da0
[FIX] handled ssl hosts
archetipo Sep 2, 2015
7687908
[FIX] fixed, last review remarks
archetipo Nov 2, 2015
ec314b9
[FIX] travis lint check
archetipo Nov 2, 2015
3a0f71e
[FIX] backup only local db , beacause xmlrpc call of dump cause memor…
archetipo Nov 25, 2015
7253a9a
[RM] useless field
archetipo Nov 25, 2015
0eb0dc9
[FIX] check_dd method
archetipo Nov 30, 2015
d1899bb
[auto_backup] Refactor.
Mar 9, 2016
58a8ac7
Reduce headers.
Mar 9, 2016
7164c8a
Fix view format.
Mar 9, 2016
afd1595
Add shortcut to execute backups from the "More" menu.
Mar 10, 2016
c63a7d5
Avoid duplicated backups.
Mar 10, 2016
71f4a14
Make sure you don't backup inside the filestore folder.
Mar 10, 2016
c70098f
[FIX] This was removing all databases.
Mar 10, 2016
bdb17f2
FIX License type
archetipo Mar 22, 2016
d295521
OCA Transbot updated translations from Transifex
oca-transbot Apr 17, 2016
3aa3687
OCA Transbot updated translations from Transifex
oca-transbot May 8, 2016
0eef6c4
OCA Transbot updated translations from Transifex
oca-transbot May 15, 2016
ba6c986
[FIX] auto_backup: bad reference to field sftp_private_key (#423)
jabibi May 18, 2016
d78f7a9
[FIX] auto_backup: Empty dump using sftp backup option (#432)
jabibi May 25, 2016
df026d7
[FIX] logger db_backup for pysftp (#419)
bealdav May 26, 2016
ff45639
OCA Transbot updated translations from Transifex
oca-transbot May 29, 2016
ed124d6
OCA Transbot updated translations from Transifex
oca-transbot Jun 12, 2016
aaa7d95
OCA Transbot updated translations from Transifex
oca-transbot Jul 3, 2016
7220128
OCA Transbot updated translations from Transifex
oca-transbot Jul 31, 2016
8c4d5da
[FIX] remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
a385974
[MIG] auto_backup: Migrate to v9
lasley Aug 23, 2016
c46a309
[ADD] auto_backup: Test coverage
lasley Aug 26, 2016
4c77da4
[MIG] auto_backup: Update to v10
lasley Nov 18, 2016
d0445a2
[IMP] auto_backup: Add timeout note & blog link
lasley Nov 18, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions auto_backup/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

====================
Database Auto-Backup
====================

A tool for all your back-ups, internal and external!

Installation
============

Before installing this module, you need to execute::

pip install pysftp

Configuration
=============

Go to *Settings -> Configuration -> Configure Backup* to
create your configurations for each database that you needed
to backups.

Usage
=====

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ran into an issue where backup execution was dying when running inside of Odoo due to the timeouts configured on the instance. We had to make a small script to run this system outside of the main Odoo instance to circumvent this, which is described in this blog post.

If this is something other people have run into as well, maybe transferring some of that info to this ReadMe would be of use?

Keep your Odoo data safe with this module. Take automated back-ups,
remove them automatically and even write them to an external server
through an encrypted tunnel. You can even specify how long local backups
and external backups should be kept, automatically!

Connect with an FTP Server
--------------------------

Keep your data safe, through an SSH tunnel!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Want to go even further and write your backups to an external server?
You can with this module! Specify the credentials to the server, specify
a path and everything will be backed up automatically. This is done
through an SSH (encrypted) tunnel, thanks to pysftp, so your data is
safe!

Test connection
---------------

Checks your credentials in one click
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Want to make sure if the connection details are correct and if Odoo can
automatically write them to the remote server? Simply click on the ‘Test
SFTP Connection’ button and you will get message telling you if
everything is OK, or what is wrong!

E-mail on backup failure
------------------------

Stay informed of problems, automatically!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do you want to know if the database backup succeeded or failed? Subscribe to
the corresponding backup setting notification type.

Run backups when you want
-------------------------

From the backups configuration list, press *More > Execute backup(s)* to
manually execute the selected processes.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/10.0

Known issues / Roadmap
======================

* On larger databases, it is possible that backups will die due to Odoo server
settings. In order to circumvent this without frivolously changing settings,
you need to run the backup from outside of the main Odoo instance. How to do
this is outlined in `this blog post
<https://blog.laslabs.com/2016/10/running-python-scripts-within-odoos-environment/>`_.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Contributors
------------

* Yenthe Van Ginneken <yenthe.vanginneken@vanroey.be>
* Alessio Gerace <alessio.gerace@agilebg.com>
* Jairo Llopis <yajo.sk8@gmail.com>
* Dave Lasley <dave@laslabs.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
7 changes: 7 additions & 0 deletions auto_backup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# © 2004-2009 Tiny SPRL (<http://tiny.be>).
# © 2015 Agile Business Group <http://www.agilebg.com>
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).

from . import models
36 changes: 36 additions & 0 deletions auto_backup/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
# © 2004-2009 Tiny SPRL (<http://tiny.be>).
# © 2015 Agile Business Group <http://www.agilebg.com>
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).

{
"name": "Database Auto-Backup",
"summary": "Backups database",
"version": "10.0.1.0.0",
"author": (
"Yenthe Van Ginneken, "
"Agile Business Group, "
"Grupo ESOC Ingeniería de Servicios, "
"LasLabs, "
"Odoo Community Association (OCA)"
),
'license': "AGPL-3",
"website": "http://www.vanroey.be/applications/bedrijfsbeheer/odoo",
"category": "Tools",
"depends": [
'base_setup',
'mail',
],
"data": [
"data/ir_cron.xml",
"data/mail_message_subtype.xml",
"security/ir.model.access.csv",
"view/db_backup_view.xml",
],
"application": True,
"installable": True,
"external_dependencies": {
"python": ["pysftp"],
},
}
18 changes: 18 additions & 0 deletions auto_backup/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<odoo noupdate="1">

<record id="ir_cron_backup_scheduler_0" model="ir.cron">
<field name="name">Backup Scheduler</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="nextcall"
eval="(datetime.now() + timedelta(days=1)).strftime('%Y-%m-%d 02:00:00')"
/>
<field name="model">db.backup</field>
<field name="function">action_backup_all</field>
</record>

</odoo>
19 changes: 19 additions & 0 deletions auto_backup/data/mail_message_subtype.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<odoo noupdate="1">

<record id="mail_message_subtype_success" model="mail.message.subtype">
<field name="name">Backup Successful</field>
<field name="description">Database backup succeeded.</field>
<field name="res_model">db.backup</field>
<field name="default" eval="False" />
</record>

<record id="mail_message_subtype_failure" model="mail.message.subtype">
<field name="name">Backup Failed</field>
<field name="description">Database backup failed.</field>
<field name="res_model">db.backup</field>
<field name="default" eval="True" />
</record>

</odoo>
Loading