Browse Source

Merge pull request #203 from archetipo/porting_auto_backup_oca

Porting auto backup oca server-tools
pull/407/head
Alexandre Fayolle 9 years ago
parent
commit
d8413edddf
  1. 2
      .travis.yml
  2. 106
      auto_backup/README.rst
  3. 7
      auto_backup/__init__.py
  4. 31
      auto_backup/__openerp__.py
  5. 28
      auto_backup/data/backup_data.yml
  6. 299
      auto_backup/i18n/de.po
  7. 335
      auto_backup/i18n/it.po
  8. 292
      auto_backup/i18n/nl.po
  9. 292
      auto_backup/i18n/nl_BE.po
  10. 298
      auto_backup/i18n/zh_CN.po
  11. 6
      auto_backup/models/__init__.py
  12. 283
      auto_backup/models/db_backup.py
  13. 3
      auto_backup/security/ir.model.access.csv
  14. BIN
      auto_backup/static/description/icon.png
  15. 51
      auto_backup/static/description/icon.svg
  16. 7
      auto_backup/tests/__init__.py
  17. 28
      auto_backup/tests/test_auto_backup.py
  18. 108
      auto_backup/view/db_backup_view.xml
  19. 1
      requirements.txt

2
.travis.yml

@ -22,7 +22,7 @@ env:
- TRANSIFEX="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="OCA/OCB"
- UNIT_TEST="1"
- UNIT_TEST="1"
virtualenv:
system_site_packages: true

106
auto_backup/README.rst

@ -0,0 +1,106 @@
.. 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
=====
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/8.0
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 <yenthe.vanginneken@vanroey.be>
* Alessio Gerace <alessio.gerace@agilebg.com>
* Jairo Llopis <yajo.sk8@gmail.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
auto_backup/__init__.py

@ -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

31
auto_backup/__openerp__.py

@ -0,0 +1,31 @@
# -*- 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": "8.0.1.0.0",
"author": (
"VanRoey.be - Yenthe Van Ginneken, Agile Business Group,"
" Grupo ESOC Ingeniería de Servicios,"
" Odoo Community Association (OCA)"
),
'license': "AGPL-3",
"website": "http://www.vanroey.be/applications/bedrijfsbeheer/odoo",
"category": "Tools",
"depends": ['email_template'],
"demo": [],
"data": [
"data/backup_data.yml",
"security/ir.model.access.csv",
"view/db_backup_view.xml",
],
"application": True,
"installable": True,
"external_dependencies": {
"python": ["pysftp"],
},
}

28
auto_backup/data/backup_data.yml

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Cron job
- !record {model: ir.cron, id: ir_cron_backupscheduler0}:
name: Backup scheduler
user_id: base.user_root
interval_number: 1
interval_type: days
numbercall: -1
nextcall: !eval
(datetime.now() + timedelta(days=1)).strftime("%Y-%m-%d 02:00:00")
model: db.backup
function: action_backup_all
# New message subtypes
- !record {model: mail.message.subtype, id: success}:
name: Backup successful
res_model: db.backup
default: False
description: Database backup succeeded.
- !record {model: mail.message.subtype, id: failure}:
name: Backup failed
res_model: db.backup
default: True
description: Database backup failed.

299
auto_backup/i18n/de.po

@ -0,0 +1,299 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auto_backup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-26 14:17+0000\n"
"PO-Revision-Date: 2015-04-17 11:24+0100\n"
"Last-Translator: Martin Schmid <m.schmid@equitania.de>\n"
"Language-Team: Equitania Software GmbH <info@myodoo.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.7.5\n"
"Language: de\n"
"X-Poedit-SourceCharset: UTF-8\n"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:137
#, python-format
msgid "%s"
msgstr "%s"
#. module: auto_backup
#: help:db.backup,bkp_dir:0
msgid "Absolute path for storing the backups"
msgstr "Absoluter Pfad zum Speichern der Sicherungen"
#. module: auto_backup
#: field:db.backup,sendmailsftpfail:0
msgid "Auto. E-mail on backup fail"
msgstr "Auto. E-Mail, wenn Datensicherung fehlschlägt"
#. module: auto_backup
#: field:db.backup,autoremove:0
msgid "Auto. Remove Backups"
msgstr "Auto. Entfernen von Sicherungen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Automatic backups of the database can be scheduled as follows:"
msgstr "Automatische Sicherungen der Datenbank können wie folgt geplant werden:"
#. module: auto_backup
#: field:db.backup,bkp_dir:0
msgid "Backup Directory"
msgstr "Sicherungs-Verzeichnis"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_tree
msgid "Backups"
msgstr "Sicherungen"
#. module: auto_backup
#: help:db.backup,daystokeepsftp:0
msgid ""
"Choose after how many days the backup should be deleted from the FTP server. For example:\n"
"If you fill in 5 the backups will be removed after 5 days from the FTP server."
msgstr ""
"Wählen Sie, nach wie vielen Tagen die Sicherung vom FTP-Server gelöscht werden soll. Beispiel: \n"
"Wenn Sie \"5\" angeben, werden die Sicherungen nach 5 Tagen vom FTP-Server entfernt."
#. module: auto_backup
#: help:db.backup,daystokeep:0
msgid ""
"Choose after how many days the backup should be deleted. For example:\n"
"If you fill in 5 the backups will be removed after 5 days."
msgstr ""
"Wählen Sie, nach wie vielen Tagen die Sicherung vom FTP-Server gelöscht werden soll. Beispiel: \n"
"Wenn Sie \"5\" angeben, werden die Sicherungen nach 5 Tagen vom FTP-Server entfernt."
#. module: auto_backup
#: model:ir.actions.act_window,name:auto_backup.action_backup_conf_form
#: model:ir.ui.menu,name:auto_backup.backup_conf_menu
msgid "Configure Backup"
msgstr "Backup einstellen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Contact us!"
msgstr "Sprechen Sie uns an!"
#. module: auto_backup
#: field:db.backup,create_uid:0
msgid "Created by"
msgstr "Erstellt von"
#. module: auto_backup
#: field:db.backup,create_date:0
msgid "Created on"
msgstr "Erstellt am:"
#. module: auto_backup
#: field:db.backup,name:0
msgid "Database"
msgstr "Datenbank"
#. module: auto_backup
#: help:db.backup,name:0
msgid "Database you want to schedule backups for"
msgstr "Datenbank Sicherungen einplanen für"
#. module: auto_backup
#: field:db.backup,emailtonotify:0
msgid "E-mail to notify"
msgstr "E-Mail Benachrichtigen"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:106 constraint:db.backup:0
#, python-format
msgid "Error ! No such database exists!"
msgstr "Fehler! Keine solche Datenbank vorhanden!"
#. module: auto_backup
#: help:db.backup,emailtonotify:0
msgid "Fill in the e-mail where you want to be notified that the backup failed on the FTP."
msgstr "Geben Sie die E-Mail-Adresse an, die bei Sicherungsfehlern auf dem FTP verwendet werden soll."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "For example: /odoo/backups/"
msgstr "Zum Beispiel: /odoo/Backups /"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Go to Settings / Technical / Automation / Scheduled Actions."
msgstr "Gehen Sie zu Einstellungen / Technisch / Automation / Geplante Vorgänge"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Help"
msgstr "Hilfe"
#. module: auto_backup
#: field:db.backup,host:0
msgid "Host"
msgstr "Host"
#. module: auto_backup
#: field:db.backup,id:0
msgid "ID"
msgstr "ID"
#. module: auto_backup
#: field:db.backup,sftpip:0
msgid "IP Address SFTP Server"
msgstr "IP-Adresse SFTP-Server"
#. module: auto_backup
#: help:db.backup,sendmailsftpfail:0
msgid "If you check this option you can choose to automaticly get e-mailed when the backup to the external server failed."
msgstr "Wenn Sie diese Option aktivieren, erhalten Sie automatisch eine e-Mail, wenn die Sicherung mit dem externen Server fehlgeschlagen ist."
#. module: auto_backup
#: help:db.backup,autoremove:0
msgid "If you check this option you can choose to automaticly remove the backup after xx days"
msgstr "Wenn Sie diese Option aktivieren, können Sie die Sicherung automatisch nach Xx Tagen entfernen"
#. module: auto_backup
#: help:db.backup,sftpwrite:0
msgid "If you check this option you can specify the details needed to write to a remote server with SFTP."
msgstr "Wenn Sie diese Option aktivieren, können Sie Details für einen entfernten SFTP-Server angeben."
#. module: auto_backup
#: field:db.backup,write_uid:0
msgid "Last Updated by"
msgstr "Zuletzt aktualisiert von"
#. module: auto_backup
#: field:db.backup,write_date:0
msgid "Last Updated on"
msgstr "Zuletzt aktualisiert am"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Local backup configuration"
msgstr "Lokale Sicherungs-Konfiguration"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Need more help?"
msgstr "Benötigen Sie weitere Hilfe?"
#. module: auto_backup
#: field:db.backup,sftppassword:0
msgid "Password User SFTP Server"
msgstr "Passwort Benutzer SFTP-Server"
#. module: auto_backup
#: field:db.backup,sftppath:0
msgid "Path external server"
msgstr "Externen Server Pfad"
#. module: auto_backup
#: field:db.backup,port:0
msgid "Port"
msgstr "Port"
#. module: auto_backup
#: field:db.backup,daystokeepsftp:0
msgid "Remove SFTP after x days"
msgstr "SFTP nach x Tagen entfernen"
#. module: auto_backup
#: field:db.backup,daystokeep:0
msgid "Remove after x days"
msgstr "Entfernen nach x Tagen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "SFTP"
msgstr "SFTP"
#. module: auto_backup
#: field:db.backup,sftpport:0
msgid "SFTP Port"
msgstr "SFTP-Port"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_search
msgid "Search options"
msgstr "Suchkriterien"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Search the action named 'Backup scheduler'."
msgstr "Suchen Sie die Aktion mit dem Namen \"Backup Scheduler\"."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Set the scheduler to active and fill in how often you want backups generated."
msgstr "Setzen Sie die Aktion auf aktiv und geben Sie an wie oft die Sicherungen erstellt werden soll."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test"
msgstr "Test"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test SFTP Connection"
msgstr "Verbindung testen"
#. module: auto_backup
#: help:db.backup,sftpip:0
msgid "The IP address from your remote server. For example 192.168.0.1"
msgstr "Die IP-Adresse Ihres entfernten Servers. Zum Beispiel 192.168.0.1"
#. module: auto_backup
#: help:db.backup,sftppath:0
msgid ""
"The location to the folder where the dumps should be written to. For example /odoo/backups/.\n"
"Files will then be written to /odoo/backups/ on your remote server."
msgstr ""
"Der Speicherort für den Ordner an dem die Sicherungen in gespeichert werden sollen. Zum Beispiel wird /odoo/backups/.\n"
"Files geschrieben zu /odoo/backups / / auf dem remote Server."
#. module: auto_backup
#: help:db.backup,sftppassword:0
msgid "The password from the user where the SFTP connection should be made with. This is the password from the user on the external server."
msgstr "Das Kennwort des Benutzers mit dem die SFTP-Verbindung mit hergestellt werden soll. Dies ist das Kennwort des Benutzers auf dem externen Server."
#. module: auto_backup
#: help:db.backup,sftpport:0
msgid "The port on the FTP server that accepts SSH/SFTP calls."
msgstr "Der Port auf dem FTP-Server, der SSH/SFTP Anfragen annimmt."
#. module: auto_backup
#: help:db.backup,sftpusername:0
msgid "The username where the SFTP connection should be made with. This is the user on the external server."
msgstr "Der Benutzername mit dem die SFTP-Verbindung mit hergestellt werden soll. Dies ist der Benutzer auf dem externen Server."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals."
msgstr "Dies ist Konfiguration der Aktion automatisierte Backups der Datenbank auf dem angegebenen Server durchzuführen."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Use SFTP with caution! This writes files to external servers under the path you specify."
msgstr "Verwenden Sie SFTP mit Vorsicht! Dies schreibt Dateien auf externen Servern unter dem Pfad, den Sie angeben."
#. module: auto_backup
#: field:db.backup,sftpusername:0
msgid "Username SFTP Server"
msgstr "Benutzername SFTP-Server"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Warning:"
msgstr "Warnung:"
#. module: auto_backup
#: field:db.backup,sftpwrite:0
msgid "Write to external server with sftp"
msgstr "Auf externen Server mit SFTP schreiben"

335
auto_backup/i18n/it.po

@ -0,0 +1,335 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auto_backup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-21 13:00+0000\n"
"PO-Revision-Date: 2015-07-21 13:00+0000\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: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:204
#, python-format
msgid "\n"
"Your IP address seems to be too short.\n"
""
msgstr "\n"
"L' indirizzo IP sembra essere troppo corto.\n"
""
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:209
#, python-format
msgid "%s"
msgstr "%s"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:288
#, python-format
msgid "(Part of the) path didn't exist. Creating it now at %s"
msgstr "(Una parte del) path non esiste. Verra' creato in %s"
#. module: auto_backup
#: help:db.backup,bkp_dir:0
msgid "Absolute path for storing the backups"
msgstr "Percorso assoluto per il salvataggio del DB"
#. module: auto_backup
#: field:db.backup,sendmailsftpfail:0
msgid "Auto. E-mail on backup fail"
msgstr "Auto. E-mail nel caso di errori durante il backup "
#. module: auto_backup
#: field:db.backup,autoremove:0
msgid "Auto. Remove Backups"
msgstr "Rimuovi Backups"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Automatic backups of the database can be scheduled as follows:"
msgstr "Il backup automatico del DB e' pianificato come segue:"
#. module: auto_backup
#: field:db.backup,bkp_dir:0
msgid "Backup Directory"
msgstr "Backup Directory"
#. module: auto_backup
#: model:email.template,subject:auto_backup.email_template_autobackup_error_noificaiton
msgid "Backup from ${object.host} - (${object.sftpip}) failed"
msgstr "Backup da ${object.host} - (${object.sftpip}) fallito"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_tree
msgid "Backups"
msgstr "Backups"
#. module: auto_backup
#: help:db.backup,daystokeepsftp:0
msgid "Choose after how many days the backup should be deleted from the FTP server. For example:\n"
"If you fill in 5 the backups will be removed after 5 days from the FTP server."
msgstr "Scegliere dopo quanti giorni si possa condsiderare da eliminare, un Backup nel server FTP. Per esempio:\n"
"se si imposta 5 i files di backups piu' vecchi di 5 giorni saranno eliminati dal server FTP"
#. module: auto_backup
#: help:db.backup,daystokeep:0
msgid "Scegliere dopo quanti giorni si possa condsiderare da eliminare un Backup. For example:\n"
"If you fill in 5 the backups will be removed after 5 days."
msgstr "Choose after how many days the backup should be deleted. For example:\n"
"se si imposta 5 i files di backups piu' vecchi di 5 giorni saranno eliminati."
#. module: auto_backup
#: model:ir.actions.act_window,name:auto_backup.action_backup_conf_form
#: model:ir.ui.menu,name:auto_backup.backup_conf_menu
msgid "Configure Backup"
msgstr "Configura Backup"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:202
#, python-format
msgid "Connection Test Failed!"
msgstr "Test connessione Fallito!"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:198
#, python-format
msgid "Connection Test Succeeded!"
msgstr "Test connessione avvenuto con successo!"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:241
#, python-format
msgid "Couldn't backup database %s. Bad database administratorpassword for server running at http://%s:%s"
msgstr "Impossibile eseguire il backup di %s. DB password erraata per il server http://%s:%s"
#. module: auto_backup
#: field:db.backup,create_uid:0
msgid "Created by"
msgstr "Created by"
#. module: auto_backup
#: field:db.backup,create_date:0
msgid "Created on"
msgstr "Created on"
#. module: auto_backup
#: field:db.backup,name:0
msgid "Database"
msgstr "Database"
#. module: auto_backup
#: help:db.backup,name:0
msgid "Database you want to schedule backups for"
msgstr "Database you want to schedule backups for"
#. module: auto_backup
#: field:db.backup,emailtonotify:0
#: field:db.backup,lasterrorlog:0
msgid "E-mail to notify"
msgstr "E-mail di notifica"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:176
#, python-format
msgid "Error"
msgstr "Errore"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:176
#, python-format
msgid "Error ! No such database exists!"
msgstr "Errore ! Il DB non esiste!"
#. module: auto_backup
#: code:addons/auto_backup/model/backup_scheduler.py:199
#, python-format
msgid "Everything seems properly set up for FTP back-ups!"
msgstr "Tutto sembra impostato correttamente per il back-up FTP!"
#. module: auto_backup
#: help:db.backup,emailtonotify:0
#: help:db.backup,lasterrorlog:0
msgid "Fill in the e-mail where you want to be notified that the backup failed on the FTP."
msgstr "Compilare l'e -mail in cui si desidera essere avvisati,se il backup FTP fallisce."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "For example: /odoo/backups/"
msgstr "Es.: /odoo/backups/"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Go to Settings / Technical / Automation / Scheduled Actions."
msgstr "Anadare in Settings / Technical / Automation / Scheduled Actions."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Help"
msgstr "Aiuto"
#. module: auto_backup
#: field:db.backup,host:0
msgid "Host"
msgstr "Host"
#. module: auto_backup
#: field:db.backup,id:0
msgid "ID"
msgstr "ID"
#. module: auto_backup
#: field:db.backup,sftpip:0
msgid "IP Address SFTP Server"
msgstr "IP Address SFTP Server"
#. module: auto_backup
#: help:db.backup,sendmailsftpfail:0
msgid "If you check this option you can choose to automaticly get e-mailed when the backup to the external server failed."
msgstr "Se si seleziona questa opzione è possibile scegliere di essere notificati automaticamente via e-mail quando il backup al server esterno fallisce ."
#. module: auto_backup
#: help:db.backup,autoremove:0
msgid "If you check this option you can choose to automaticly remove the backup after xx days"
msgstr "Se si seleziona questa opzione è possibile scegliere di rimuovere automaticamente il backup dopo xx giorni"
#. module: auto_backup
#: help:db.backup,sftpwrite:0
msgid "If you check this option you can specify the details needed to write to a remote server with SFTP."
msgstr "Se si seleziona questa opzione è possibile specificare i dettagli necessari per scrivere a un server remoto con SFTP ."
#. module: auto_backup
#: field:db.backup,write_uid:0
msgid "Last Updated by"
msgstr "Last Updated by"
#. module: auto_backup
#: field:db.backup,write_date:0
msgid "Last Updated on"
msgstr "Last Updated on"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Local backup configuration"
msgstr "Configurazione backup locale"
#. module: auto_backup
#: field:db.backup,sftppassword:0
msgid "Password User SFTP Server"
msgstr "Password utene SFTP Server"
#. module: auto_backup
#: field:db.backup,sftppath:0
msgid "Path external server"
msgstr "Path server esterno"
#. module: auto_backup
#: field:db.backup,port:0
msgid "Port"
msgstr "Porta"
#. module: auto_backup
#: field:db.backup,daystokeepsftp:0
msgid "Remove SFTP after x days"
msgstr "Rimuovi backup da SFTP dopo x giorni"
#. module: auto_backup
#: field:db.backup,daystokeep:0
msgid "Remove after x days"
msgstr "Rimuovi dopo x giorni"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "SFTP"
msgstr "SFTP"
#. module: auto_backup
#: field:db.backup,sftpport:0
msgid "SFTP Port"
msgstr "Porta SFTP"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_search
msgid "Search options"
msgstr "Search options"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Search the action named 'Backup scheduler'."
msgstr "Cerca l'azione denominata ' di pianificazione del backup ' ."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Set the scheduler to active and fill in how often you want backups generated."
msgstr "Impostare lo scheduler per attivare e compilare la frequenza con cui si desidera generare il backup."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test"
msgstr "Test"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test SFTP Connection"
msgstr "Test SFTP Connection"
#. module: auto_backup
#: help:db.backup,sftpip:0
msgid "The IP address from your remote server. For example 192.168.0.1"
msgstr "Indirizzo IP server remoto. Es. 192.168.0.1"
#. module: auto_backup
#: help:db.backup,sftppath:0
msgid "The location to the folder where the dumps should be written to. For example /odoo/backups/.\n"
"Files will then be written to /odoo/backups/ on your remote server."
msgstr "La posizione della cartella in cui i dumps devono essere scritti. Es. /odoo/backups/.\n"
"i files verranno scritti su /odoo/backups/ nel server remoto."
#. module: auto_backup
#: help:db.backup,sftppassword:0
msgid "The password from the user where the SFTP connection should be made with. This is the password from the user on the external server."
msgstr "La password dell'utente con cui la connessione SFTP deve essere fatta. Questa è la password dall'utente sul server esterno ."
#. module: auto_backup
#: help:db.backup,sftpport:0
msgid "The port on the FTP server that accepts SSH/SFTP calls."
msgstr "La porta sul server FTP che accetta chiamate SSH / SFTP."
#. module: auto_backup
#: help:db.backup,sftpusername:0
msgid "The username where the SFTP connection should be made with. This is the user on the external server."
msgstr "Il nome utente in cui la connessione SFTP dovrebbe essere fatto con . Questo è l'utente sul server esterno."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals."
msgstr "pianificazione per il backup automatico del database in esecuzione su dato host /porta ad intervalli regolari."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Use SFTP with caution! This writes files to external servers under the path you specify."
msgstr "Usare SFTP con cautela ! Questo scrive file su server esterni nel percorso specificato "
#. module: auto_backup
#: field:db.backup,sftpusername:0
msgid "Username SFTP Server"
msgstr "Username SFTP Server"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Warning:"
msgstr "Warning:"
#. module: auto_backup
#: field:db.backup,sftpwrite:0
msgid "Write to external server with sftp"
msgstr "Salva il backup anche su server FTP esterno"

292
auto_backup/i18n/nl.po

@ -0,0 +1,292 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auto_backup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-26 14:17+0000\n"
"PO-Revision-Date: 2015-03-26 14:17+0000\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: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:137
#, python-format
msgid "%s"
msgstr "%s"
#. module: auto_backup
#: help:db.backup,bkp_dir:0
msgid "Absolute path for storing the backups"
msgstr "Absoluut pad om backups te bewaren"
#. module: auto_backup
#: field:db.backup,sendmailsftpfail:0
msgid "Auto. E-mail on backup fail"
msgstr "Auto. e-mailen wanneer backup mislukt"
#. module: auto_backup
#: field:db.backup,autoremove:0
msgid "Auto. Remove Backups"
msgstr "Auto. backups verwijderen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Automatic backups of the database can be scheduled as follows:"
msgstr "Automatische backups van de database kunnen als volgend gepland worden:"
#. module: auto_backup
#: field:db.backup,bkp_dir:0
msgid "Backup Directory"
msgstr "Backup folder"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_tree
msgid "Backups"
msgstr "Backups"
#. module: auto_backup
#: help:db.backup,daystokeepsftp:0
msgid "Choose after how many days the backup should be deleted from the FTP server. For example:\n"
"If you fill in 5 the backups will be removed after 5 days from the FTP server."
msgstr "Kies na hoeveel dagen de backups verwijderd moeten worden van de FTP server. Bijvoorbeeld:\n"
"Als u 5 invult zal de backup na 5 dagen verwijderd worden van de FTP server."
#. module: auto_backup
#: help:db.backup,daystokeep:0
msgid "Choose after how many days the backup should be deleted. For example:\n"
"If you fill in 5 the backups will be removed after 5 days."
msgstr "Kies na hoeveel dagen de backup verwijderd moet worden. Bijvoorbeeld:\n"
"Als u 5 invult zal de backup verwijderd worden na 5 dagen."
#. module: auto_backup
#: model:ir.actions.act_window,name:auto_backup.action_backup_conf_form
#: model:ir.ui.menu,name:auto_backup.backup_conf_menu
msgid "Configure Backup"
msgstr "Configureer backup"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Contact us!"
msgstr "Contacteer ons!"
#. module: auto_backup
#: field:db.backup,create_uid:0
msgid "Created by"
msgstr "Gemaakt door"
#. module: auto_backup
#: field:db.backup,create_date:0
msgid "Created on"
msgstr "Gemaakt op"
#. module: auto_backup
#: field:db.backup,name:0
msgid "Database"
msgstr "Database"
#. module: auto_backup
#: help:db.backup,name:0
msgid "Database you want to schedule backups for"
msgstr "Database waar u backups voor wilt plannen"
#. module: auto_backup
#: field:db.backup,emailtonotify:0
msgid "E-mail to notify"
msgstr "E-mail om te verwittigen"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:106
#: constraint:db.backup:0
#, python-format
msgid "Error ! No such database exists!"
msgstr "Error! Deze database bestaat niet!"
#. module: auto_backup
#: help:db.backup,emailtonotify:0
msgid "Fill in the e-mail where you want to be notified that the backup failed on the FTP."
msgstr "Vul de e-mail in waarop u wilt verwittigd worden als de backup mislukt op de FTP."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "For example: /odoo/backups/"
msgstr "Bijvoorbeeld: /odoo/backups/"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Go to Settings / Technical / Automation / Scheduled Actions."
msgstr "Ga naar Instellingen / Technsich / Automatisering / Geplande acties"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Help"
msgstr "Help"
#. module: auto_backup
#: field:db.backup,host:0
msgid "Host"
msgstr "Host"
#. module: auto_backup
#: field:db.backup,id:0
msgid "ID"
msgstr "ID"
#. module: auto_backup
#: field:db.backup,sftpip:0
msgid "IP Address SFTP Server"
msgstr "IP adres SFTP server"
#. module: auto_backup
#: help:db.backup,sendmailsftpfail:0
msgid "If you check this option you can choose to automaticly get e-mailed when the backup to the external server failed."
msgstr "Als u deze optie aanvinkt kan u kiezen om automatisch een e-mail aan te krijgen als de backup
naar de externe server mislukt."
#. module: auto_backup
#: help:db.backup,autoremove:0
msgid "If you check this option you can choose to automaticly remove the backup after xx days"
msgstr "Als u deze optie aanvinkt kan u kiezen om automatisch backups te verwijderen na xx dagen"
#. module: auto_backup
#: help:db.backup,sftpwrite:0
msgid "If you check this option you can specify the details needed to write to a remote server with SFTP."
msgstr "Als u deze optie aanvinkt kan u de details invullen die nodig zijn om te connecteren met de externe SFTP server."
#. module: auto_backup
#: field:db.backup,write_uid:0
msgid "Last Updated by"
msgstr "Laatst bijgewerkt door"
#. module: auto_backup
#: field:db.backup,write_date:0
msgid "Last Updated on"
msgstr "Laatst bijgewerkt op"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Local backup configuration"
msgstr "Lokale backup configuratie"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Need more help?"
msgstr "Meer hulp nodig?"
#. module: auto_backup
#: field:db.backup,sftppassword:0
msgid "Password User SFTP Server"
msgstr "Wachtwoord gebruiker SFTP server"
#. module: auto_backup
#: field:db.backup,sftppath:0
msgid "Path external server"
msgstr "Pad externe server"
#. module: auto_backup
#: field:db.backup,port:0
msgid "Port"
msgstr "Poort"
#. module: auto_backup
#: field:db.backup,daystokeepsftp:0
msgid "Remove SFTP after x days"
msgstr "SFTP verwijderen na x dagen"
#. module: auto_backup
#: field:db.backup,daystokeep:0
msgid "Remove after x days"
msgstr "Verwijderen na x dagen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "SFTP"
msgstr "SFTP"
#. module: auto_backup
#: field:db.backup,sftpport:0
msgid "SFTP Port"
msgstr "SFTP poort"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_search
msgid "Search options"
msgstr "Zoekopties"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Search the action named 'Backup scheduler'."
msgstr "Zoek de actie genaamd 'Backup scheduler'."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Set the scheduler to active and fill in how often you want backups generated."
msgstr "Zet de planner op actief en vul in hoe vaak de backup moet gemaakt worden."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test"
msgstr "Test"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test SFTP Connection"
msgstr "Test SFTP Connectie"
#. module: auto_backup
#: help:db.backup,sftpip:0
msgid "The IP address from your remote server. For example 192.168.0.1"
msgstr "Het IP adres van uw externe server. Bijvoorbeeld: 192.168.0.1"
#. module: auto_backup
#: help:db.backup,sftppath:0
msgid "The location to the folder where the dumps should be written to. For example /odoo/backups/.\n"
"Files will then be written to /odoo/backups/ on your remote server."
msgstr "De locatie naar de folder waar de backup naar toe moet geschreven worden. Bijvoorbeeld odoo/backups/\n"
"Bestanden worden dan naar /odoo/backups/ geschreven op de externe server"
#. module: auto_backup
#: help:db.backup,sftppassword:0
msgid "The password from the user where the SFTP connection should be made with. This is the password from the user on the external server."
msgstr "Het wachtwoord van de gebruiker waar de SFTP connectie mee moet gemaakt worden. Dit is het wachtwoord van de gebruiker op de externe server."
#. module: auto_backup
#: help:db.backup,sftpport:0
msgid "The port on the FTP server that accepts SSH/SFTP calls."
msgstr "De poort op de FTP server die SSH/SFTP accepteert."
#. module: auto_backup
#: help:db.backup,sftpusername:0
msgid "The username where the SFTP connection should be made with. This is the user on the external server."
msgstr "De gebruikersnaam waar de SFTP connectie mee gemaakt moet worden. Dit is de gebruiker op de externe server."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals."
msgstr "Dit configureert de planner voor automatische backups op de ingegeven database waar de host, poort en database op zijn ingegeven voor reguliere intervallen."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Use SFTP with caution! This writes files to external servers under the path you specify."
msgstr "Gebruik SFTP voorzichtig! Dit schrijft bestanden naar externe servers onder het pad dat u opgeeft."
#. module: auto_backup
#: field:db.backup,sftpusername:0
msgid "Username SFTP Server"
msgstr "Gebruikersnaam SFTP Server"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Warning:"
msgstr "Waarschuwing:"
#. module: auto_backup
#: field:db.backup,sftpwrite:0
msgid "Write to external server with sftp"
msgstr "Schrijf naar externe server met SFTP"

292
auto_backup/i18n/nl_BE.po

@ -0,0 +1,292 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auto_backup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-26 14:17+0000\n"
"PO-Revision-Date: 2015-03-26 14:17+0000\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: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:137
#, python-format
msgid "%s"
msgstr "%s"
#. module: auto_backup
#: help:db.backup,bkp_dir:0
msgid "Absolute path for storing the backups"
msgstr "Absoluut pad om backups te bewaren"
#. module: auto_backup
#: field:db.backup,sendmailsftpfail:0
msgid "Auto. E-mail on backup fail"
msgstr "Auto. e-mailen wanneer backup mislukt"
#. module: auto_backup
#: field:db.backup,autoremove:0
msgid "Auto. Remove Backups"
msgstr "Auto. backups verwijderen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Automatic backups of the database can be scheduled as follows:"
msgstr "Automatische backups van de database kunnen als volgend gepland worden:"
#. module: auto_backup
#: field:db.backup,bkp_dir:0
msgid "Backup Directory"
msgstr "Backup folder"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_tree
msgid "Backups"
msgstr "Backups"
#. module: auto_backup
#: help:db.backup,daystokeepsftp:0
msgid "Choose after how many days the backup should be deleted from the FTP server. For example:\n"
"If you fill in 5 the backups will be removed after 5 days from the FTP server."
msgstr "Kies na hoeveel dagen de backups verwijderd moeten worden van de FTP server. Bijvoorbeeld:\n"
"Als u 5 invult zal de backup na 5 dagen verwijderd worden van de FTP server."
#. module: auto_backup
#: help:db.backup,daystokeep:0
msgid "Choose after how many days the backup should be deleted. For example:\n"
"If you fill in 5 the backups will be removed after 5 days."
msgstr "Kies na hoeveel dagen de backup verwijderd moet worden. Bijvoorbeeld:\n"
"Als u 5 invult zal de backup verwijderd worden na 5 dagen."
#. module: auto_backup
#: model:ir.actions.act_window,name:auto_backup.action_backup_conf_form
#: model:ir.ui.menu,name:auto_backup.backup_conf_menu
msgid "Configure Backup"
msgstr "Configureer backup"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Contact us!"
msgstr "Contacteer ons!"
#. module: auto_backup
#: field:db.backup,create_uid:0
msgid "Created by"
msgstr "Gemaakt door"
#. module: auto_backup
#: field:db.backup,create_date:0
msgid "Created on"
msgstr "Gemaakt op"
#. module: auto_backup
#: field:db.backup,name:0
msgid "Database"
msgstr "Database"
#. module: auto_backup
#: help:db.backup,name:0
msgid "Database you want to schedule backups for"
msgstr "Database waar u backups voor wilt plannen"
#. module: auto_backup
#: field:db.backup,emailtonotify:0
msgid "E-mail to notify"
msgstr "E-mail om te verwittigen"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:106
#: constraint:db.backup:0
#, python-format
msgid "Error ! No such database exists!"
msgstr "Error! Deze database bestaat niet!"
#. module: auto_backup
#: help:db.backup,emailtonotify:0
msgid "Fill in the e-mail where you want to be notified that the backup failed on the FTP."
msgstr "Vul de e-mail in waarop u wilt verwittigd worden als de backup mislukt op de FTP."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "For example: /odoo/backups/"
msgstr "Bijvoorbeeld: /odoo/backups/"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Go to Settings / Technical / Automation / Scheduled Actions."
msgstr "Ga naar Instellingen / Technsich / Automatisering / Geplande acties"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Help"
msgstr "Help"
#. module: auto_backup
#: field:db.backup,host:0
msgid "Host"
msgstr "Host"
#. module: auto_backup
#: field:db.backup,id:0
msgid "ID"
msgstr "ID"
#. module: auto_backup
#: field:db.backup,sftpip:0
msgid "IP Address SFTP Server"
msgstr "IP adres SFTP server"
#. module: auto_backup
#: help:db.backup,sendmailsftpfail:0
msgid "If you check this option you can choose to automaticly get e-mailed when the backup to the external server failed."
msgstr "Als u deze optie aanvinkt kan u kiezen om automatisch een e-mail aan te krijgen als de backup
naar de externe server mislukt."
#. module: auto_backup
#: help:db.backup,autoremove:0
msgid "If you check this option you can choose to automaticly remove the backup after xx days"
msgstr "Als u deze optie aanvinkt kan u kiezen om automatisch backups te verwijderen na xx dagen"
#. module: auto_backup
#: help:db.backup,sftpwrite:0
msgid "If you check this option you can specify the details needed to write to a remote server with SFTP."
msgstr "Als u deze optie aanvinkt kan u de details invullen die nodig zijn om te connecteren met de externe SFTP server."
#. module: auto_backup
#: field:db.backup,write_uid:0
msgid "Last Updated by"
msgstr "Laatst bijgewerkt door"
#. module: auto_backup
#: field:db.backup,write_date:0
msgid "Last Updated on"
msgstr "Laatst bijgewerkt op"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Local backup configuration"
msgstr "Lokale backup configuratie"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Need more help?"
msgstr "Meer hulp nodig?"
#. module: auto_backup
#: field:db.backup,sftppassword:0
msgid "Password User SFTP Server"
msgstr "Wachtwoord gebruiker SFTP server"
#. module: auto_backup
#: field:db.backup,sftppath:0
msgid "Path external server"
msgstr "Pad externe server"
#. module: auto_backup
#: field:db.backup,port:0
msgid "Port"
msgstr "Poort"
#. module: auto_backup
#: field:db.backup,daystokeepsftp:0
msgid "Remove SFTP after x days"
msgstr "SFTP verwijderen na x dagen"
#. module: auto_backup
#: field:db.backup,daystokeep:0
msgid "Remove after x days"
msgstr "Verwijderen na x dagen"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "SFTP"
msgstr "SFTP"
#. module: auto_backup
#: field:db.backup,sftpport:0
msgid "SFTP Port"
msgstr "SFTP poort"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_search
msgid "Search options"
msgstr "Zoekopties"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Search the action named 'Backup scheduler'."
msgstr "Zoek de actie genaamd 'Backup scheduler'."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Set the scheduler to active and fill in how often you want backups generated."
msgstr "Zet de planner op actief en vul in hoe vaak de backup moet gemaakt worden."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test"
msgstr "Test"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test SFTP Connection"
msgstr "Test SFTP Connectie"
#. module: auto_backup
#: help:db.backup,sftpip:0
msgid "The IP address from your remote server. For example 192.168.0.1"
msgstr "Het IP adres van uw externe server. Bijvoorbeeld: 192.168.0.1"
#. module: auto_backup
#: help:db.backup,sftppath:0
msgid "The location to the folder where the dumps should be written to. For example /odoo/backups/.\n"
"Files will then be written to /odoo/backups/ on your remote server."
msgstr "De locatie naar de folder waar de backup naar toe moet geschreven worden. Bijvoorbeeld odoo/backups/\n"
"Bestanden worden dan naar /odoo/backups/ geschreven op de externe server"
#. module: auto_backup
#: help:db.backup,sftppassword:0
msgid "The password from the user where the SFTP connection should be made with. This is the password from the user on the external server."
msgstr "Het wachtwoord van de gebruiker waar de SFTP connectie mee moet gemaakt worden. Dit is het wachtwoord van de gebruiker op de externe server."
#. module: auto_backup
#: help:db.backup,sftpport:0
msgid "The port on the FTP server that accepts SSH/SFTP calls."
msgstr "De poort op de FTP server die SSH/SFTP accepteert."
#. module: auto_backup
#: help:db.backup,sftpusername:0
msgid "The username where the SFTP connection should be made with. This is the user on the external server."
msgstr "De gebruikersnaam waar de SFTP connectie mee gemaakt moet worden. Dit is de gebruiker op de externe server."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals."
msgstr "Dit configureert de planner voor automatische backups op de ingegeven database waar de host, poort en database op zijn ingegeven voor reguliere intervallen."
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Use SFTP with caution! This writes files to external servers under the path you specify."
msgstr "Gebruik SFTP voorzichtig! Dit schrijft bestanden naar externe servers onder het pad dat u opgeeft."
#. module: auto_backup
#: field:db.backup,sftpusername:0
msgid "Username SFTP Server"
msgstr "Gebruikersnaam SFTP Server"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Warning:"
msgstr "Waarschuwing:"
#. module: auto_backup
#: field:db.backup,sftpwrite:0
msgid "Write to external server with sftp"
msgstr "Schrijf naar externe server met SFTP"

298
auto_backup/i18n/zh_CN.po

@ -0,0 +1,298 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auto_backup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-26 14:17+0000\n"
"PO-Revision-Date: 2015-03-27 00:16+0800\n"
"Last-Translator: <>\n"
"Language-Team: Talway <1473162392@qq.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: zh_CN\n"
"X-Generator: Poedit 1.7.5\n"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:137
#, python-format
msgid "%s"
msgstr "%s"
#. module: auto_backup
#: help:db.backup,bkp_dir:0
msgid "Absolute path for storing the backups"
msgstr "备份绝对路径"
#. module: auto_backup
#: field:db.backup,sendmailsftpfail:0
msgid "Auto. E-mail on backup fail"
msgstr "FTP备份失败自动邮件通知你"
#. module: auto_backup
#: field:db.backup,autoremove:0
msgid "Auto. Remove Backups"
msgstr "自动删除备份"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Automatic backups of the database can be scheduled as follows:"
msgstr "数据库的自动备份时间安排如下:"
#. module: auto_backup
#: field:db.backup,bkp_dir:0
msgid "Backup Directory"
msgstr "备份目录"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_tree
msgid "Backups"
msgstr "备份"
#. module: auto_backup
#: help:db.backup,daystokeepsftp:0
msgid ""
"Choose after how many days the backup should be deleted from the FTP server. For example:\n"
"If you fill in 5 the backups will be removed after 5 days from the FTP server."
msgstr ""
"选择后多少天备份应被删除从 FTP 服务器。例如: \n"
"如果你填写 5, 将5 天后 从FTP 服务器 删除备份文件。"
#. module: auto_backup
#: help:db.backup,daystokeep:0
msgid ""
"Choose after how many days the backup should be deleted. For example:\n"
"If you fill in 5 the backups will be removed after 5 days."
msgstr ""
"选择后多少天备份应被删除。例如: \n"
"如果你填写5,将 5 天后删除备份。"
#. module: auto_backup
#: model:ir.actions.act_window,name:auto_backup.action_backup_conf_form
#: model:ir.ui.menu,name:auto_backup.backup_conf_menu
msgid "Configure Backup"
msgstr "数据库备份"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Contact us!"
msgstr "邮件联系我们!"
#. module: auto_backup
#: field:db.backup,create_uid:0
msgid "Created by"
msgstr "创建者"
#. module: auto_backup
#: field:db.backup,create_date:0
msgid "Created on"
msgstr "创建时间"
#. module: auto_backup
#: field:db.backup,name:0
msgid "Database"
msgstr "数据库"
#. module: auto_backup
#: help:db.backup,name:0
msgid "Database you want to schedule backups for"
msgstr "计划备份的数据库"
#. module: auto_backup
#: field:db.backup,emailtonotify:0
msgid "E-mail to notify"
msgstr "E-mail邮件地址"
#. module: auto_backup
#: code:addons/auto_backup/backup_scheduler.py:106 constraint:db.backup:0
#, python-format
msgid "Error ! No such database exists!"
msgstr "错误 !这个数据库不存在 !"
#. module: auto_backup
#: help:db.backup,emailtonotify:0
msgid "Fill in the e-mail where you want to be notified that the backup failed on the FTP."
msgstr "FTP备份失败时,邮件通知你详细信息"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "For example: /odoo/backups/"
msgstr "例如: /odoo/backups/"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Go to Settings / Technical / Automation / Scheduled Actions."
msgstr "点击 设置 / 技术 / 自动化 / 计划的动作"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Help"
msgstr "帮助"
#. module: auto_backup
#: field:db.backup,host:0
msgid "Host"
msgstr "服务器"
#. module: auto_backup
#: field:db.backup,id:0
msgid "ID"
msgstr "ID"
#. module: auto_backup
#: field:db.backup,sftpip:0
msgid "IP Address SFTP Server"
msgstr " SFTP 服务器 IP 地址"
#. module: auto_backup
#: help:db.backup,sendmailsftpfail:0
msgid "If you check this option you can choose to automaticly get e-mailed when the backup to the external server failed."
msgstr "如果您选中此选项,您可以选择自动收到通过邮件发送到外部服务器备份失败的信息。"
#. module: auto_backup
#: help:db.backup,autoremove:0
msgid "If you check this option you can choose to automaticly remove the backup after xx days"
msgstr "如果您选中此选项,您可以选择 xx 天后自动删除备份"
#. module: auto_backup
#: help:db.backup,sftpwrite:0
msgid "If you check this option you can specify the details needed to write to a remote server with SFTP."
msgstr "如果您选中此选项,您可以指定需要写入 sftp 的远程服务器的详细信息。"
#. module: auto_backup
#: field:db.backup,write_uid:0
msgid "Last Updated by"
msgstr "最后更新者"
#. module: auto_backup
#: field:db.backup,write_date:0
msgid "Last Updated on"
msgstr "上次更新日期"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Local backup configuration"
msgstr "本地备份配置"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Need more help?"
msgstr "需要更多帮助吗?"
#. module: auto_backup
#: field:db.backup,sftppassword:0
msgid "Password User SFTP Server"
msgstr " SFTP服务器密码"
#. module: auto_backup
#: field:db.backup,sftppath:0
msgid "Path external server"
msgstr "服务器目录"
#. module: auto_backup
#: field:db.backup,port:0
msgid "Port"
msgstr "端口"
#. module: auto_backup
#: field:db.backup,daystokeepsftp:0
msgid "Remove SFTP after x days"
msgstr "多少天后从服务器删除"
#. module: auto_backup
#: field:db.backup,daystokeep:0
msgid "Remove after x days"
msgstr "多少天后删除"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "SFTP"
msgstr "SFTP"
#. module: auto_backup
#: field:db.backup,sftpport:0
msgid "SFTP Port"
msgstr "SFTP 端口"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_search
msgid "Search options"
msgstr "搜索选项"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Search the action named 'Backup scheduler'."
msgstr "搜索计划备份调度程序“Backup scheduler”。"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Set the scheduler to active and fill in how often you want backups generated."
msgstr "设置计划动作为有效,并填写备份间隔时间,间隔时间单位,间隔次数,执行时间等数据库具体备份方案。"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test"
msgstr "测试"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Test SFTP Connection"
msgstr "测试 SFTP 连接"
#. module: auto_backup
#: help:db.backup,sftpip:0
msgid "The IP address from your remote server. For example 192.168.0.1"
msgstr "SFTP服务器的 IP 地址。例如: 192.168.0.1"
#. module: auto_backup
#: help:db.backup,sftppath:0
msgid ""
"The location to the folder where the dumps should be written to. For example /odoo/backups/.\n"
"Files will then be written to /odoo/backups/ on your remote server."
msgstr ""
"转储应将写入的文件夹位置。例如 /odoo/backups/远程服务器上,然后将写入 /odoo/backups/.\n"
"Files。"
#. module: auto_backup
#: help:db.backup,sftppassword:0
msgid "The password from the user where the SFTP connection should be made with. This is the password from the user on the external server."
msgstr "从 SFTP 服务器连接该用户的密码。这是SFTP服务器上的用户密码。"
#. module: auto_backup
#: help:db.backup,sftpport:0
msgid "The port on the FTP server that accepts SSH/SFTP calls."
msgstr "接受 SSH/SFTP 使用的FTP 服务器上的端口。"
#. module: auto_backup
#: help:db.backup,sftpusername:0
msgid "The username where the SFTP connection should be made with. This is the user on the external server."
msgstr "SFTP 连接使用该用户名。这是在SFTP服务器上的用户。"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals."
msgstr "配置适用指定数据库备份 在设置服务器端口定期运行"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Use SFTP with caution! This writes files to external servers under the path you specify."
msgstr "请注意你的 SFTP服务器网络安全!数据库备份文件将备份到你的SFTP服务器,文件保存在设置的目录下面。"
#. module: auto_backup
#: field:db.backup,sftpusername:0
msgid "Username SFTP Server"
msgstr "SFTP服务器用户名"
#. module: auto_backup
#: view:db.backup:auto_backup.view_backup_conf_form
msgid "Warning:"
msgstr "警告:"
#. module: auto_backup
#: field:db.backup,sftpwrite:0
msgid "Write to external server with sftp"
msgstr "备份到外部 sftp 服务器"

6
auto_backup/models/__init__.py

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# © 2004-2009 Tiny SPRL (<http://tiny.be>).
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
from . import db_backup

283
auto_backup/models/db_backup.py

@ -0,0 +1,283 @@
# -*- 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 AGPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
import os
import shutil
import tempfile
import traceback
from contextlib import contextmanager
from datetime import datetime, timedelta
from glob import iglob
from openerp import exceptions, models, fields, api, _, tools
from openerp.service import db
import logging
_logger = logging.getLogger(__name__)
try:
import pysftp
except ImportError:
_logger.warning('Cannot import pysftp')
class DbBackup(models.Model):
_name = 'db.backup'
_inherit = "mail.thread"
_sql_constraints = [
("name_unique", "UNIQUE(name)", "Cannot duplicate a configuration."),
("days_to_keep_positive", "CHECK(days_to_keep >= 0)",
"I cannot remove backups from the future. Ask Doc for that."),
]
name = fields.Char(
string="Name",
compute="_compute_name",
store=True,
help="Summary of this backup process",
)
folder = fields.Char(
default=lambda self: self._default_folder(),
oldname="bkp_dir",
help='Absolute path for storing the backups',
required=True
)
days_to_keep = fields.Integer(
oldname="daystokeep",
required=True,
default=0,
help="Backups older than this will be deleted automatically. "
"Set 0 to disable autodeletion.",
)
method = fields.Selection(
selection=[("local", "Local disk"), ("sftp", "Remote SFTP server")],
default="local",
help="Choose the storage method for this backup.",
)
sftp_host = fields.Char(
string='SFTP Server',
oldname="sftpip",
help=(
"The host name or IP address from your remote"
" server. For example 192.168.0.1"
)
)
sftp_port = fields.Integer(
string="SFTP Port",
default=22,
oldname="sftpport",
help="The port on the FTP server that accepts SSH/SFTP calls."
)
sftp_user = fields.Char(
string='Username in the SFTP Server',
oldname="sftpusername",
help=(
"The username where the SFTP connection "
"should be made with. This is the user on the external server."
)
)
sftp_password = fields.Char(
string="SFTP Password",
oldname="sftppassword",
help="The password for the SFTP connection. If you specify a private "
"key file, then this is the password to decrypt it.",
)
sftp_private_key = fields.Char(
string="Private key location",
help="Path to the private key file. Only the Odoo user should have "
"read permissions for that file.",
)
@api.model
def _default_folder(self):
"""Default to ``backups`` folder inside current server datadir."""
return os.path.join(
tools.config["data_dir"],
"backups",
self.env.cr.dbname)
@api.multi
@api.depends("folder", "method", "sftp_host", "sftp_port", "sftp_user")
def _compute_name(self):
"""Get the right summary for this job."""
for rec in self:
if rec.method == "local":
rec.name = "%s @ localhost" % rec.folder
elif rec.method == "sftp":
rec.name = "sftp://%s@%s:%d%s" % (
rec.sftp_user, rec.sftp_host, rec.sftp_port, rec.folder)
@api.constrains("folder", "method")
@api.multi
def _check_folder(self):
"""Do not use the filestore or you will backup your backups."""
for s in self:
if (s.method == "local" and
s.folder.startswith(
tools.config.filestore(self.env.cr.dbname))):
raise exceptions.ValidationError(
_("Do not save backups on your filestore, or you will "
"backup your backups too!"))
@api.multi
def action_sftp_test_connection(self):
"""Check if the SFTP settings are correct."""
try:
# Just open and close the connection
with self.sftp_connection():
raise exceptions.Warning(_("Connection Test Succeeded!"))
except (pysftp.CredentialException, pysftp.ConnectionException):
_logger.info("Connection Test Failed!", exc_info=True)
raise exceptions.Warning(_("Connection Test Failed!"))
@api.multi
def action_backup(self):
"""Run selected backups."""
backup = None
filename = self.filename(datetime.now())
successful = self.browse()
# Start with local storage
for rec in self.filtered(lambda r: r.method == "local"):
with rec.backup_log():
# Directory must exist
try:
os.makedirs(rec.folder)
except OSError:
pass
with open(os.path.join(rec.folder, filename),
'wb') as destiny:
# Copy the cached backup
if backup:
with open(backup) as cached:
shutil.copyfileobj(cached, destiny)
# Generate new backup
else:
db.dump_db(self.env.cr.dbname, destiny)
backup = backup or destiny.name
successful |= rec
# Ensure a local backup exists if we are going to write it remotely
sftp = self.filtered(lambda r: r.method == "sftp")
if sftp:
if backup:
cached = open(backup)
else:
cached = tempfile.TemporaryFile()
db.dump_db(self.env.cr.dbname, cached)
with cached:
for rec in sftp:
with rec.backup_log():
with rec.sftp_connection() as remote:
# Directory must exist
try:
remote.makedirs(rec.folder)
except pysftp.ConnectionException:
pass
# Copy cached backup to remote server
with remote.open(
os.path.join(rec.folder, filename),
"wb") as destiny:
shutil.copyfileobj(cached, destiny)
successful |= rec
# Remove old files for successful backups
successful.cleanup()
@api.model
def action_backup_all(self):
"""Run all scheduled backups."""
return self.search([]).action_backup()
@api.multi
@contextmanager
def backup_log(self):
"""Log a backup result."""
try:
_logger.info("Starting database backup: %s", self.name)
yield
except:
_logger.exception("Database backup failed: %s", self.name)
escaped_tb = tools.html_escape(traceback.format_exc())
self.message_post(
"<p>%s</p><pre>%s</pre>" % (
_("Database backup failed."),
escaped_tb),
subtype=self.env.ref("auto_backup.failure"))
else:
_logger.info("Database backup succeeded: %s", self.name)
self.message_post(_("Database backup succeeded."))
@api.multi
def cleanup(self):
"""Clean up old backups."""
now = datetime.now()
for rec in self.filtered("days_to_keep"):
with rec.cleanup_log():
oldest = self.filename(now - timedelta(days=rec.days_to_keep))
if rec.method == "local":
for name in iglob(os.path.join(rec.folder,
"*.dump.zip")):
if os.path.basename(name) < oldest:
os.unlink(name)
elif rec.method == "sftp":
with rec.sftp_connection() as remote:
for name in remote.listdir(rec.folder):
if (name.endswith(".dump.zip") and
os.path.basename(name) < oldest):
remote.unlink(name)
@api.multi
@contextmanager
def cleanup_log(self):
"""Log a possible cleanup failure."""
try:
_logger.info("Starting cleanup process after database backup: %s",
self.name)
yield
except:
_logger.exception("Cleanup of old database backups failed: %s")
escaped_tb = tools.html_escape(traceback.format_exc())
self.message_post(
"<p>%s</p><pre>%s</pre>" % (
_("Cleanup of old database backups failed."),
escaped_tb),
subtype=self.env.ref("auto_backup.failure"))
else:
_logger.info("Cleanup of old database backups succeeded: %s",
self.name)
@api.model
def filename(self, when):
"""Generate a file name for a backup.
:param datetime.datetime when:
Use this datetime instead of :meth:`datetime.datetime.now`.
"""
return "{:%Y_%m_%d_%H_%M_%S}.dump.zip".format(when)
@api.multi
def sftp_connection(self):
"""Return a new SFTP connection with found parameters."""
params = {
"host": self.sftp_host,
"username": self.sftp_user,
"port": self.sftp_port,
}
_logger.debug(
"Trying to connect to sftp://%(username)s@%(host)s:%(port)d",
extra=params)
if self.sftp_private_key:
params["private_key"] = self.stfpprivatekey
if self.sftp_password:
params["private_key_pass"] = self.sftp_password
else:
params["password"] = self.sftp_password
return pysftp.Connection(**params)

3
auto_backup/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_db_backup_read,Read db.backup,model_db_backup,base.group_erp_manager,1,0,0,0
access_db_backup_write,Write db.backup,model_db_backup,base.group_system,1,1,1,1

BIN
auto_backup/static/description/icon.png

After

Width: 100  |  Height: 100  |  Size: 5.9 KiB

51
auto_backup/static/description/icon.svg

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
viewBox="0 0 99.999997 99.999997"
height="100"
width="100">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-952.36223)"
id="layer1">
<text
id="text3336"
y="1031.6924"
x="40.411446"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:88.29121399px;font-family:'Nuosu SIL';-inkscape-font-specification:'Nuosu SIL';text-align:center;text-anchor:middle;fill:#1a1a1a;fill-opacity:1;stroke:#000000;stroke-width:1.7658242;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
xml:space="preserve"><tspan
style="fill:#1a1a1a;stroke-width:1.7658242"
y="1031.6924"
x="40.411446"
id="tspan3338"></tspan></text>
<text
id="text3340"
y="1050.2731"
x="74.752251"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.87847137px;font-family:'Nuosu SIL';-inkscape-font-specification:'Nuosu SIL';text-align:center;text-anchor:middle;fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:1.13756943;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
xml:space="preserve"><tspan
style="stroke-width:1.13756943"
y="1050.2731"
x="74.752251"
id="tspan3342"></tspan></text>
</g>
</svg>

7
auto_backup/tests/__init__.py

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015 Agile Business Group <http://www.agilebg.com>
# © 2015 Alessio Gerace <alesiso.gerace@agilebg.com>
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_auto_backup

28
auto_backup/tests/test_auto_backup.py

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# © 2015 Agile Business Group <http://www.agilebg.com>
# © 2015 Alessio Gerace <alesiso.gerace@agilebg.com>
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import os
from datetime import datetime
from openerp.tests import common
class TestsAutoBackup(common.TransactionCase):
def setUp(self):
super(TestsAutoBackup, self).setUp()
self.abk = self.env["db.backup"].create(
{
'name': u'Têst backup',
}
)
def test_local(self):
"""A local database is backed up."""
filename = self.abk.filename(datetime.now())
self.abk.action_backup()
generated_backup = [f for f in os.listdir(self.abk.folder)
if f >= filename]
self.assertEqual(len(generated_backup), 1)

108
auto_backup/view/db_backup_view.xml

@ -0,0 +1,108 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_backup_conf_form">
<field name="name">Automated Backups</field>
<field name="model">db.backup</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<h1><field name="name"/></h1>
<group string="Basic backup configuration">
<field name="folder"/>
<field name="days_to_keep"/>
<field name="method"/>
</group>
<div attrs="{'invisible': [('method', '!=', 'sftp')]}">
<div class="bg-warning text-warning">
<h3>Warning:</h3>
Use SFTP with caution! This writes files to external servers under the path you specify.
</div>
<group string="SFTP Settings">
<field name="sftp_host" placeholder="sftp.example.com"/>
<field name="sftp_port"/>
<field name="sftp_user" placeholder="john"/>
<field name="sftp_password"/>
<field
name="sftp_private_key"
placeholder="/home/odoo/.ssh/id_rsa"/>
<button
name="action_sftp_test_connection"
type="object"
string="Test SFTP Connection"
icon="gtk-network"/>
</group>
</div>
<separator string="Help" colspan="2"/>
<div>
Automatic backups of the database can be scheduled as follows:
<ol>
<li>Go to Settings / Technical / Automation / Scheduled Actions.</li>
<li>Search the action named 'Backup scheduler'.</li>
<li>Set the scheduler to active and fill in how often you want backups generated.</li>
</ol>
</div>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_backup_conf_tree">
<field name="name">Automated Backups</field>
<field name="model">db.backup</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Backups">
<field name='name'/>
<field name='folder'/>
<field name="sftp_host"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_backup_conf_search">
<field name="name">Automated Backups</field>
<field name="model">db.backup</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search options">
<field name='name'/>
<field name='folder'/>
<field name="sftp_host"/>
</search>
</field>
</record>
<act_window
name="Automated Backups"
id="action_backup_conf_form"
res_model="db.backup"/>
<menuitem
parent="base.menu_config"
action="action_backup_conf_form"
id="backup_conf_menu"/>
<!-- Execute backup from "More" menu -->
<record id="action_server_backup" model="ir.actions.server">
<field name="name">Execute backup(s)</field>
<field name="model_id" ref="model_db_backup"/>
<field name="code">
object.action_backup()
</field>
</record>
<record model="ir.values" id="action_backup">
<field name="name">Execute backup(s)</field>
<field name="action_id" ref="action_server_backup" />
<field
name="value"
eval="'ir.actions.server,%d' % ref('action_server_backup')" />
<field name="key">action</field>
<field name="model_id" ref="model_db_backup" />
<field name="model">db.backup</field>
<field name="key2">client_action_multi</field>
</record>
</data>
</openerp>

1
requirements.txt

@ -1,3 +1,4 @@
python-ldap
unidecode
validate_email
pysftp
Loading…
Cancel
Save