Skip to content

Commit

Permalink
Open FTP session on the last moment possible
Browse files Browse the repository at this point in the history
Used to open  fp = open(file_path,'wb') a few lines before it was needed. This shouldn't be too much of a problem but opening and closing it right after eachother keeps the session open for less time and there are less chances on failure.
  • Loading branch information
archetipo authored and jcmontoyach committed Oct 8, 2019
1 parent 4f3d342 commit d1bed5e
Show file tree
Hide file tree
Showing 13 changed files with 1,199 additions and 267 deletions.
100 changes: 100 additions & 0 deletions auto_backup/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

=================
Automated backups
=================

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

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

Before to install this module, you need to:

instal pysftp via pip.

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

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

Usage
=====


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 failed? Check the checkbox 'Auto. E-mail on backup fail' and fill in your e-mail.
Every time a backup fails you will get an e-mail in your mailbox with technical details.


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

* ...

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
`here <https://github.com/OCA/server-tools/issues/new?body=module:%20auto_backup%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

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

* Yenthe Van Ginneken <[email protected]>
* Alessio Gerace <[email protected]>

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 http://odoo-community.org.
24 changes: 24 additions & 0 deletions auto_backup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
# Copyright (C) 2015 Agile Business Group <http://www.agilebg.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import model
from . import tests
43 changes: 43 additions & 0 deletions auto_backup/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
# Copyright (C) 2015 Agile Business Group <http://www.agilebg.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
"name": "Database Auto-Backup",
"version": "8.0.1.0.0",
"author": (
"VanRoey.be - Yenthe Van Ginneken, Agile Business Group,"
" Odoo Community Association (OCA)"
),
'license': "AGPL-3",
"website": "http://www.vanroey.be/applications/bedrijfsbeheer/odoo",
"category": "Tools",
"summary": "Backups data base",
"depends": ['email_template'],
"demo": [],
"data": [
"view/bkp_conf_view.xml",
"data/backup_data.xml",
"security/ir.model.access.csv"
],
"application": True,
"installable": True
}
Loading

0 comments on commit d1bed5e

Please sign in to comment.