Giter Site home page Giter Site logo

auto_backup's Introduction

1. Prerequisites

This module needs the Python library pysftp, otherwise it cannot be installed and used. Install pysftp through the command sudo pip install pysftp

2. Which version to choose?

Version 16.0 is the latest stable version for this module and is compatible with the latest Odoo version (Odoo 16). The versions 8.0, 9.0, 10.0, 11.0, 12.0 and 13.0 of this module are tested and verified to work for their specific Odoo versions. The master version is the development version and will be for the next Odoo version. The master version is still in testing and contains the newest features, which might still have problems/error.
Tip: At this point the master version is being rewritten to drop the pysftp library need, please don't use this version at this point.
If you need to connect to a remote FTP server on another port than port 22 you should download and install the 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 or master version. Version 8 does not support another port than 22.

3. Guide / documentation

Need more help with this module or want a guide about how to set this up?

4. Important information

4.1 limit_time_real parameter

When you've configured your Odoo instance to run with workers you should change the default value of limit_time_real (as this defaults to 120). You can configure the value in /etc/odoo/your_odoo.conf to the appropriate number in case of a large database backup. This is required when max_cron_threads > 0 to avoid worker timeout during the backup.

4.2 list_db parameter

The backup module only used to work when list_db was set to True (or was not configured). Since 28/02/2020 ( https://github.com/Yenthe666/auto_backup/commit/c7d0512a0d0b2d42662831008e7a9316b264f23e) you no longer have to have the database manager enabled and the module can also take backups without it being exposed. If you run the backup module before this commit and want to run it without the database manager being exposed you should update the backup module to the latest version first. It is advised to disable the database manager for security purposes. See https://www.odoo.com/documentation/16.0/administration/install/deploy.html#database-manager-security for more information about this subject.

4.3 --load / server_wide_modules parameter

In V12, V13 and V14 Odoo will need the values 'base' and 'web' set if you use the --load (or server_wide_modules) parameter. Without these values set you will get a 404 NOT FOUND from the backup module. For more information see #122

4.4 "No matching record found for external id" error

This happens when you've installed - or tried to install - the back-up module without having the dependency pysftp installed. You might need to restart your Odoo instance or even your whole server for Odoo to recognize the Python package.

4.5 Running on Odoo.sh

If you run on Odoo.sh you should download and install the second module, "auto_backup_sh", along with the "auto_backup" module. This module adds the support for writing backups generated by Odoo SA (on Odoo.sh) to a remote SFTP. As Odoo.sh does not allow triggering backups through command this module reuses the last daily (automated) backup and pushes this backup to a remote location through SFTP: image

5. Bugs or problems

Please post them here under 'Issues' and I will get back to you as soon as I can!

auto_backup's People

Contributors

arif-m150 avatar danayen avatar dependabot[bot] avatar hgati avatar magneticlab-ch avatar randall-vx avatar spilymp avatar sswapnesh avatar willmakenoise avatar yenthe666 avatar zeip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto_backup's Issues

Unnecessary copy of files

Thank you for this great module - I love it!

I have 2 suggested improvements

  1. User defined SSH port ( I see this has been done on master branch)
  2. There is an unnecessary copy of files onto the sftp server. I know the module can be configured to work around this, however, I feel that one simple change improves the module and performance.

Before copying the file using srv.put(pathToWriteTo)
check if the file exists using srv.exists(f)

Without this, older backups are copied over to the sftp server every time the scheduler runs.

Not generating backups.

The module is scheduled to run every 5 minutes. (For Testing)

There is nothing in log about it.
There is no backups in the backup folder.

getting error while putting sftp credential

i am getting this error.

Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo1/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo1/openerp/http.py", line 567, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo1/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo1/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo1/openerp/http.py", line 300, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo1/openerp/http.py", line 796, in call
return self.method(_args, *_kw)
File "/opt/odoo1/openerp/http.py", line 396, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo1/addons/web/controllers/main.py", line 953, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo1/addons/web/controllers/main.py", line 941, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo1/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo1/addons/auto_backup/backup_scheduler.py", line 113, in test_sftp_connection
db_list = self.get_db_list(cr, uid, [], rec.host, rec.port)
File "/opt/odoo1/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo1/addons/auto_backup/backup_scheduler.py", line 57, in get_db_list
db_list = execute(conn, 'list')
File "/opt/odoo1/addons/auto_backup/backup_scheduler.py", line 46, in execute
raise e
error: [Errno 111] Connection refused

Which Time Zone is being used?

Hello Yenthe,

when I set up the backup via "Configure Backup", I have to set a time for the backup. Can you tell me which time zone is being used by the module?

My server is located in Hong Kong, but we are administrating it from Germany, so the admins time zone is Germany.

[8.0] "Update Modules list" crashes with auto_backup made available to it

cloned 8.0 branch

1st thing that looks unfamiliar to me is that there is the git folder auto_backup and inside there is a README and another folder auto_backup (which actually is the Module). At least if I make the 'mother' auto_backup folder available, the Module does not show inside of odoo.

now, when I finally make the 2nd tier auto_backup folder available to my addons_patch the "Update Modules List" command returns and error

XmlHttpRequestError INTERNAL SERVER ERROR

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is a

tested this twice with the same result. With your Module available this error pops up, without auto_backp "Update Mouldes List" works fine. I have no coding skills at all and the error message does not tell me anything. Maybe you can make some heads and tails to it

Host Settings

Yenthe666,

I am unable to get the backup to run and the odoo-server.log log says it's a bad db admin password. After troubleshooting different passwords in the openerp-server.conf file, I think it's failing because of bad configuration settings in the module.

My server redirects from the default http://localhost:8069 to https://mangstor.com/ but when I enter mangstor or mangstor.com as the host I get a Validation Error: Field(s) `` failed against a constraint: Error ! No such database exists! I have also tried changing the port number to 443 but no luck.

What do I enter as my host?

Brad

Save date with YYYY_MM_DD_HH_MM_SS format

Files are currently saved with the format DD_MM_YYYY_HH_MM_SS, which makes the files appear in the wrong order when doing a simple ls.

$ ls -l /opt/odoo/backups/
total 65868
-rw-r--r-- 1 root root 4490622 Mar  1 12:00 01_03_2017_18_00_18_moonglow.zip
-rw-r--r-- 1 root root 4490625 Mar  2 12:00 02_03_2017_18_00_50_moonglow.zip
-rw-r--r-- 1 root root 4490621 Mar  3 12:00 03_03_2017_18_00_21_moonglow.zip
-rw-r--r-- 1 root root 4491419 Mar  4 12:00 04_03_2017_18_00_49_moonglow.zip
-rw-r--r-- 1 root root 4491425 Mar  6 17:17 06_03_2017_23_17_22_moonglow.zip
-rw-r--r-- 1 root root 4491164 Mar  7 12:20 07_03_2017_18_20_13_moonglow.zip
-rw-r--r-- 1 root root 4540087 Mar  8 12:00 08_03_2017_18_00_07_moonglow.zip
-rw-r--r-- 1 root root 4490609 Feb 21 12:00 21_02_2017_18_00_27_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490619 Feb 22 12:00 22_02_2017_18_00_41_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490626 Feb 23 12:00 23_02_2017_18_00_10_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490617 Feb 24 12:00 24_02_2017_18_00_42_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490619 Feb 25 12:00 25_02_2017_18_00_14_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490626 Feb 26 12:00 26_02_2017_18_00_44_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490617 Feb 27 12:00 27_02_2017_18_00_15_moonglow.zip                                                                                                                                                     
-rw-r--r-- 1 root root 4490626 Feb 28 12:00 28_02_2017_18_00_47_moonglow.zip

I realize I could do ls -ltr but I really see no benefit to the current filename over YYYY_MM_DD_HH_MM_SS. The file modified dates can also be modified (e.g. when copying files) so in that case ls -ltr wouldn't even work.

Backup failing on a restored database

Hello Yenthe666,
first of all I'd like to thank you for your module. I chosed it over all the alternatives that I found so far. I've just spent two days trying to figure out what is causing an issue with it but so far I could find a solution.
What I am doing is:

  1. Launch an EC2 instance with ubuntu 14.04
  2. Deploy odoo v8
  3. Create a test database and setup auto_backup
  4. Setup the scheduling and backup WORKS FINE (so far)!
  5. restore a production database (~60MB)
  6. Schedule a backup and I get:
    logger.notifyChannel('backup', netsvc.LOG_INFO, "Couldn't backup database %s. Bad database administrator password for server running at http://%s:%s" %(rec.name, rec.host, rec.port))

To try if the admin_passwd is working I am performing a backup with the web utility (/web/database/manager) and it is working fine.

[9.0][Ubuntu 14.04.4 LTS]Unable to install pysftp

Hi Yenthe
"sudo pip install pysftp" does not work. It says it's succesfully installed, but it is not. I've found out that paramiko is also necessary and not automatically installed. I did
"sudo apt-get install python-paramiko", it installed successfully.
But the error message of the module did not disappear. So I opened a python session and tried to import pysftp, and this is what I get:

import pysftp
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pysftp.py", line 10, in
import paramiko
File "/usr/local/lib/python2.7/dist-packages/paramiko/init.py", line 30, in
from paramiko.transport import SecurityOptions, Transport
File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 33, in
from paramiko import util
ImportError: cannot import name util

Now I'm stuck because I have no idea where to get this "util" from. Any advise?

Menu 'Configure Backup' not fount v8

After that the module is installed you will see a new menu item named โ€˜Configure Backupโ€™ under Settings > Configuration.

Hello, I have no problem installing the Module
but I have not found the menu to configure Backup settings
image

Access rule missing

v10

The module creates no access rule for the db.backup model. This causes the menu not to show (at least in a "copy" of the admin user).

I had to create a rule for the Admin/Settings group.

[V9 Enterprise] Back-up module keeps running and freezes up server

On V9 community the module will work fine.
On V9 Enterprise the module will totally freeze up and seems to need more CPU and RAM, which keeps stacking up.
Issue seems to happen on this part:

 try:
    bkp = execute(conn, 'dump', tools.config['admin_passwd'], rec.name, rec.backup_type)
except:
    _logger.debug("Couldn't backup database %s. Bad database administrator password for server running at http://%s:%s" %(rec.name, rec.host, rec.port))
    continue

Logfile:

2016-01-12 09:04:21,99 3783 INFO none openerp.service.db: DUMP DB: TestDb format zip

It starts the execute, keeps running an infinite time and eventually will freeze up the whole VM. Doesn't seem to go in the except or anything.

Backup Generating On Test Instance ,But in Production it fails

File "/opt/orchiderp/test/odoo/openerp/addons/base/ir/ir_cron.py", line 138, in _callback
getattr(model, method_name)(cr, uid, *args)
File "/opt/orchiderp/test/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/orchiderp/test/orchid_addons/auto_backup/backup_scheduler.py", line 158, in schedule_backup
logger.notifyChannel('backup', netsvc.LOG_INFO, "Couldn't backup database %s. Bad database administrator password for server running at http://%s:%s" %(rec.name, rec.host, rec.port))
AttributeError: 'Logger' object has no attribute 'notifyChannel'

missing pysftp error breaks Odoo website

Using Odoo v9 free and the 9.0 branch on a clean Debian Stretch x64 install, I forgot to install the pysftp module and then wondered why the web page was screwed up, no CSS and other resources were found.

Then I discovered this error in the log, and after installing pysftp, everything was back to normal (phew):

  File "/usr/lib/python2.7/dist-packages/openerp/addons/auto_backup/backup_scheduler.py", line 35, in <module>
raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)')

ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

This user error really shouldn't break the web site, but instead just logged as a normal error, also right on the auto-backup config-page:

no menuitem added for Backup Configuration

Hi Yenthe,
thank you for the great module.
I could install easily but unfortunately the menu item doesn not show up.

Odoo v8
branch 8.0 of your module.

server-log says:
openerp.modules.loading: module auto_backup: key 'update_xml' is deprecated in favor of 'data' for file 'bkp_conf_view.xml'.
openerp.modules.loading: module auto_backup: key 'update_xml' is deprecated in favor of 'data' for file 'backup_data.xml'.

Weird, isn't it?

[8.0] / [Feature Request] Google Drive Support

@Yenthe666 ,

Thanks for your hard work with this module. It's now an indispensable part of every Odoo instance I setup.

I'd like to submit a feature request. There is a FOSS project called Duplicati that offers a number of very powerful features, including incremental backups, and backups to a number of different services using their API's (eg. Google Drive, SkyDrive, and a number of others).

This project was originally based on:
http://duplicity.nongnu.org/

that is written in Python.

The backends for the services (in Dupliciti) are here:

https://github.com/duplicati/duplicati/tree/master/Duplicati/Library/Backend

I thought the project may be of interest to you for future enhancements in the auto_backup module.

Model `db.backup` does not exist.

Some users report that they get a traceback / error saying that the db.backup model is not found.
This issue also seems to be possible if you have the module already installed and seems to happen somewhere randomly in time. Example from one of my production logs:

	Line 325566: 2017-08-20 18:45:26,657 7423 INFO mydb openerp.addons.auto_backup.backup_scheduler: Copying File /odoo/backups/20_08_2017_18_00_20_mydb.zip------ success
	Line 373775: 2017-08-21 18:00:03,605 2609 WARNING mydb openerp.addons.base.ir.ir_cron: Model `db.backup` does not exist.
	Line 418334: 2017-08-22 18:00:11,203 2609 WARNING mydb openerp.addons.base.ir.ir_cron: Model `db.backup` does not exist.
	Line 462467: 2017-08-23 18:00:23,201 2609 WARNING mydb openerp.addons.base.ir.ir_cron: Model `db.backup` does not exist.
	Line 526564: 2017-08-24 18:00:32,859 2609 WARNING mydb openerp.addons.base.ir.ir_cron: Model `db.backup` does not exist

As you can see this in this logfile the backup worked fine the 20 augustus and since the 21'st of august is spits out Model db.backup does not exist. for some reason.

module installs perfectly, but when ran backup doesnt create files

Hi

I used your install script for odoo 9 so odoo is running under the odoo user. Installing with Ubuntu 64 bit server 14.04 was straight forward, but even though everything with the module installed perfectly, and I see this sensible entry in the odoo log when I run the backup from the scheduler :-

ie 2015-12-16 16:42:53,293 3400 INFO None openerp.service.db: DUMP DB: elite format zip

the folder is created, everything appears fine but never are any backup files created.

Iโ€™m happy to help debug if you can help by supplying screenshots etc and config

It could be a permissions issue, but even setting 777 privs on the folder does not help. I tried changing the odoo log to debug but no further useful info was provided.

Update Module List Error

When I do "sudo pip install pysftp" on my Ubuntu server is says that pysftp is already installed?

ubuntu@ip-172-30-0-253:~$ sudo pip install pysftp
Requirement already satisfied (use --upgrade to upgrade): pysftp in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.7.7 in /usr/local/lib/python2.7/dist-packages (from pysftp)

I get the following error after I click Update Module List in Odoo:

Odoo Server Error

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch
result = self._call_function(*_self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 300, in checked_call
return self.endpoint(_a, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 796, in call
return self.method(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 396, in response_wrap
response = f(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 928, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 393, in old_api
result = new_api(recs, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 397, in new_api
result = [method(rec, _args, *_kwargs) for rec in self]
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/wizard/base_module_update.py", line 15, in update_module
self.updated, self.added = self.env['ir.module.module'].update_list()
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
return new_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 462, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 654, in update_list
handler.load_addons()
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1298, in load_addons
m = import('openerp.addons.' + module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/usr/lib/python2.7/dist-packages/openerp/addons/auto_backup/init.py", line 23, in
import backup_scheduler
File "/usr/lib/python2.7/dist-packages/openerp/addons/auto_backup/backup_scheduler.py", line 33, in
raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)')
ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

Any idea?

Odoo backup

I backed up the folder odoo and copied to a new machine running odoo and replaced the folder. I believe my issue is user odoo does not have rights

Installation issue on Odoo 9

I believe I have everything download and odoo 9 setup correctly but when I run the install the auto_backup on Odoo9, I got this error:

(I've to re-download and re-image odoo 9, but I still got the same error. Not sure what was the issue? Thank you for help.)

Odoo
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/openerp/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/openerp/http.py", line 680, in dispatch
result = self._call_function(*_self.params)
File "/odoo/odoo-server/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/odoo/odoo-server/openerp/http.py", line 309, in checked_call
result = self.endpoint(_a, *_kw)
File "/odoo/odoo-server/openerp/http.py", line 959, in call
return self.method(_args, *_kw)
File "/odoo/odoo-server/openerp/http.py", line 509, in response_wrap
response = f(_args, *_kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 896, in call_button
action = self._call_kw(model, method, args, {})
File "/odoo/odoo-server/addons/web/controllers/main.py", line 884, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/odoo/odoo-server/openerp/addons/base/module/module.py", line 459, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/odoo/odoo-server/openerp/addons/base/module/module.py", line 533, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/odoo/odoo-server/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/openerp/modules/loading.py", line 338, in load_modules
loaded_modules, update_module)
File "/odoo/odoo-server/openerp/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/odoo/odoo-server/openerp/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/odoo/odoo-server/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/odoo/odoo-server/openerp/tools/convert.py", line 851, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/odoo/odoo-server/openerp/tools/convert.py", line 938, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/odoo/odoo-server/openerp/tools/convert.py", line 801, in parse
self.parse(rec, mode)
File "/odoo/odoo-server/openerp/tools/convert.py", line 804, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/odoo/odoo-server/openerp/tools/convert.py", line 503, in _tag_menuitem
menu_parent_id = self.id_get(cr, rec.get('parent',''))
File "/odoo/odoo-server/openerp/tools/convert.py", line 782, in id_get
res = self.model_id_get(cr, id_str, raise_if_not_found)
File "/odoo/odoo-server/openerp/tools/convert.py", line 793, in model_id_get
raise_if_not_found=raise_if_not_found)
File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/odoo/odoo-server/openerp/addons/base/ir/ir_model.py", line 960, in xmlid_to_res_model_res_id
return self.xmlid_lookup(cr, uid, xmlid)[1:3]
File "/odoo/odoo-server/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "", line 2, in xmlid_lookup
File "/odoo/odoo-server/openerp/tools/cache.py", line 85, in lookup
value = d[key] = self.method(_args, *_kwargs)
File "/odoo/odoo-server/openerp/addons/base/ir/ir_model.py", line 950, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: base.menu_config" while parsing /odoo/custom/addons/auto_backup/bkp_conf_view.xml:108, near

[8.0][Suggestion/Feature request]Backups without filestore attachments.

Good day

First of all I have to say thank you for this useful addon.

Now a suggestion: since many of us make backups of database and filestore separately, so database backups are kept at a reasonable size while filestore is copied to an external storage system, it would be a great enhancement if autobackup could be configured to backup only the database without filestore attachments.

Thank you again, best regards

pysftp dependency is not being recognized

I've cloned the github repository into my Odoo machine and added the correct dependency on odoo-server.conf file, but when I click "Update modules list" on the application, I got the following message:

Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 544, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 581, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 317, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 314, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 810, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 410, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 439, in old_api
result = new_api(recs, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 443, in new_api
result = [method(rec, *args, **kwargs) for rec in self
File "/opt/odoo/openerp/addons/base/module/wizard/base_module_update.py", line 15, in update_module self.updated, self.added = self.env['ir.module.module'].update_list()
File "/opt/odoo/openerp/api.py", line 266, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 508, in new_api
result = method(self._model, cr, uid, *args, **old_kwargs)
File "/opt/odoo/openerp/addons/base/module/module.py", line 651, in update_list
handler.load_addons()
File "/opt/odoo/openerp/http.py", line 1317, in load_addons
m = __import__('openerp.addons.' + module)
File "/opt/odoo/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/odoo/auto_backup/auto_backup/__init__.py", line 23, in
import backup_scheduler
File "/opt/odoo/auto_backup/auto_backup/backup_scheduler.py", line 33, in
raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP.
Please install pysftp on your system. (sudo pip install pysftp)')
ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

Then I typed sudo pip install pysftp in the terminal and I got

Requirement already satisfied (use --upgrade to upgrade): pysftp in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.17 in /usr/local/lib/python2.7/dist-packages (from pysftp)
Cleaning up...

I even tryed to type sudo pip install pysftp --upgrade but I got

Requirement already up-to-date: pysftp in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: paramiko>=1.17 in /usr/local/lib/python2.7/dist-packages (from pysftp)
Cleaning up...

Could you help me on that, please?

install Error:Field(s) `arch` failed against a constraint: Invalid view definition

Odoo Server Error
Traceback (most recent call last):
File "C:\GreenOdoo\source\openerp\http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\GreenOdoo\source\openerp\http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "C:\GreenOdoo\source\openerp\http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "C:\GreenOdoo\source\openerp\service\model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "C:\GreenOdoo\source\openerp\http.py", line 803, in call
return self.method(_args, *_kw)
File "C:\GreenOdoo\source\openerp\http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "C:\GreenOdoo\source\addons\web\controllers\main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "C:\GreenOdoo\source\addons\web\controllers\main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\addons\base\module\module.py", line 447, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "C:\GreenOdoo\source\openerp\api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\addons\base\module\module.py", line 495, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "C:\GreenOdoo\source\openerp\modules\registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "C:\GreenOdoo\source\openerp\modules\loading.py", line 355, in load_modules
loaded_modules, update_module)
File "C:\GreenOdoo\source\openerp\modules\loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "C:\GreenOdoo\source\openerp\modules\loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "C:\GreenOdoo\source\openerp\modules\loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "C:\GreenOdoo\source\openerp\tools\convert.py", line 901, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "C:\GreenOdoo\source\openerp\tools\convert.py", line 987, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "C:\GreenOdoo\source\openerp\tools\convert.py", line 853, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "C:\GreenOdoo\source\openerp\tools\convert.py", line 763, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "C:\GreenOdoo\source\openerp\api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\addons\base\ir\ir_model.py", line 1064, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "C:\GreenOdoo\source\openerp\api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\addons\base\ir\ir_ui_view.py", line 255, in create
context=context)
File "C:\GreenOdoo\source\openerp\api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\api.py", line 372, in old_api
result = method(recs, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\models.py", line 4094, in create
record = self.browse(self._create(old_vals))
File "C:\GreenOdoo\source\openerp\api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\api.py", line 508, in new_api
result = method(self._model, cr, uid, _args, *_old_kwargs)
File "C:\GreenOdoo\source\openerp\models.py", line 4285, in _create
recs._validate_fields(vals)
File "C:\GreenOdoo\source\openerp\api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "C:\GreenOdoo\source\openerp\models.py", line 1272, in _validate_fields
raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) arch failed against a constraint: Invalid view definition

Error details:
\u5b57\u6bb5autoremove`\u4e0d\u5b58\u5728\uff01

\u9519\u8bef\u7684context:
\u89c6\u56fe Configure Backup
[view_id: 1359, xml_id: n/a, model: db.backup, parent_id: n/a]" while parsing file:///C:/GreenOdoo/source/addons/auto_backup/bkp_conf_view.xml:4, near

Configure Backup
db.backup
form











                </group>
                <group col="4" colspan="4">
                    <separator col="2" string="SFTP"/>
                            </group>
Warning: Use SFTP with caution! This writes files to external servers under the path you specify.
                <group>
                    <field name="sftpwrite"/>
                    <field name="sftpip" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
                    <field name="sftpusername" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
                    <field name="sftppassword" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" password="True"/>
                    <field name="sftppath" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}" placeholder="For example: /odoo/backups/"/>
                    <field name="daystokeepsftp" attrs="{'invisible':[('sftpwrite', '==', False)],'required':[('sftpwrite', '==', True)]}"/>
                    <field name="sendmailsftpfail" attrs="{'invisible': [('sftpwrite','=',False)]}"/>
                    <field name="emailtonotify" attrs="{'invisible':['|',('sendmailsftpfail', '==', False),       ('sftpwrite', '==', False)],'required':[('sendmailsftpfail', '==', True)]}"/>
                    <button name="test_sftp_connection" type="object" attrs="{'invisible': [('sftpwrite','=',False)]}" string="Test SFTP Connection" icon="gtk-network"/>
                </group>
                            <separator string="Help" colspan="2"/>
                            <div>
                    This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals.
                    <br/>
                    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>
                    <p style="font-size:18px;">
                    Need more help? <a href="mailto:[email protected]">Contact us!</a>
                    </p>
                </div>
            </form>
        </field>
</record>

Backup Failures

So I have been using for the last month or so with mixed results. I am on V9 enterprise. The backups will work fine for about a week and then they just stop working. I have setup a cron job to stop the odoo service right before backup and that seems to help, but I am still missing backups. Here is the error I see in the odoo log:

016-06-28 05:01:08,806 23340 ERROR openerp.addons.base.ir.ir_cron: Call of self.pool.get('db.backup').schedule_backup(cr, uid, _()) failed in Job 14
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openerp/addons/base/ir/ir_cron.py", line 129, in _callback
getattr(model, method_name)(cr, uid, *args)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 250, in wrapper
return old_api(self, *args, *_kwargs)
File "/opt/odoo/custom-addons/auto_backup/backup_scheduler.py", line 147, in schedule_backup
db_list = self.get_db_list(cr, user, [], rec.host, rec.port)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/custom-addons/auto_backup/backup_scheduler.py", line 59, in get_db_list
db_list = execute(conn, 'list')
File "/opt/odoo/custom-addons/auto_backup/backup_scheduler.py", line 46, in execute
raise e
error: [Errno 111] Connection refused

My backup is coming in around 500mb. Any idea whats going on?

Error 'Error ! No such database exists!' when list_db set to false

Hi,

I'm running multiple databases on my server, with following configuraiton
dbfilter ^%h$"
list_db = False

I noticed when configuring auto_backup it fails with error 'Error ! No such database exists!'.
I had to set "list_db = True".

Hope this helps, in case someone faces same issue.

Odoo8 Backup Problem with Bad authentication type

I'm having trouble with this error message:

Verbindungstest fehlgeschlagen!
Here is what we got instead:
Bad authentication type
[u'publickey', u'gssapi-keyex', u'gssapi-with-mic', u'keyboard-interactive']

I have configurate a ftp connection setting.
Is there anyone that can help me with this?

I think there is a problem that auto_backup module try to make an sftp connection and my server has it on ftp?

Thank you

auto_backup fails with files bigger than 250 Mb

If the backup file is bigger than 250 Mb, the module fails . It is very dangerous. Everyting is ok until, you have some data. You are confident about your backups and no backup is done.

It happend to me in two cases. One with 400 Mb file and other with 250 mb file.
Thanks.

Error installing on Odoo v10.

Error installing on Odoo v10.
The following error message is displayed:

Traceback (most recent call last):
File "/opt/adax/odoo/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/adax/odoo/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/opt/adax/odoo/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/adax/odoo/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/adax/odoo/odoo/http.py", line 326, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/adax/odoo/odoo/http.py", line 935, in call
return self.method(*args, **kw)
File "/opt/adax/odoo/odoo/http.py", line 506, in response_wrap
response = f(*args, **kw)
File "/opt/adax/odoo/addons/web/controllers/main.py", line 889, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/adax/odoo/addons/web/controllers/main.py", line 877, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/adax/odoo/odoo/api.py", line 681, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/opt/adax/odoo/odoo/api.py", line 672, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/adax/odoo/odoo/addons/base/module/module.py", line 410, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/adax/odoo/odoo/addons/base/module/module.py", line 484, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/adax/odoo/odoo/modules/registry.py", line 82, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/adax/odoo/odoo/modules/loading.py", line 339, in load_modules
loaded_modules, update_module)
File "/opt/adax/odoo/odoo/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/adax/odoo/odoo/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/opt/adax/odoo/odoo/modules/loading.py", line 95, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/opt/adax/odoo/odoo/tools/convert.py", line 845, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/adax/odoo/odoo/tools/convert.py", line 915, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/adax/odoo/odoo/tools/convert.py", line 796, in parse
self.parse(rec, mode)
File "/opt/adax/odoo/odoo/tools/convert.py", line 799, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/adax/odoo/odoo/tools/convert.py", line 707, in _tag_record
id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
File "/opt/adax/odoo/odoo/addons/base/ir/ir_model.py", line 1228, in _update
record = record.create(values)
File "/opt/adax/odoo/odoo/addons/base/ir/ir_ui_view.py", line 362, in create
return super(View, self).create(self._compute_defaults(values))
File "/opt/adax/odoo/odoo/models.py", line 3838, in create
self._fields[key].determine_inverse(record)
File "/opt/adax/odoo/odoo/fields.py", line 1000, in determine_inverse
getattr(records, self.inverse)()
File "/opt/adax/odoo/odoo/addons/base/ir/ir_ui_view.py", line 220, in _inverse_arch
view.write(data)
File "/opt/adax/odoo/odoo/addons/base/ir/ir_ui_view.py", line 380, in write
return super(View, self).write(self._compute_defaults(vals))
File "/opt/adax/odoo/odoo/models.py", line 3564, in write
self._write(old_vals)
File "/opt/adax/odoo/odoo/models.py", line 3715, in _write
self._validate_fields(vals)
File "/opt/adax/odoo/odoo/models.py", line 1083, in validate_fields
raise ValidationError("%s\n\n%s" % (
("Error while validating constraint"), tools.ustr(e)))
ParseError: "Error while validating constraint

Modelo n\xe3o encontrado: db.backup

Contexto de erro:
Veja Configure Backup
[view_id: 1063, xml_id: n/a, model: db.backup, parent_id: n/a]
None" while parsing /opt/adax/odoo-brasil/auto_backup/bkp_conf_view.xml:4, near

Configure Backup
db.backup
form











				</group>
				<group col="4" colspan="4">
					<separator col="2" string="SFTP"/>
                			</group>
Warning: Use SFTP with caution! This writes files to external servers under the path you specify.
This configures the scheduler for automatic backup of the given database running on given host at given port on regular intervals.
Automatic backups of the database can be scheduled as follows:
  1. Go to Settings / Technical / Automation / Scheduled Actions.
  2. Search the action named 'Backup scheduler'.
  3. Set the scheduler to active and fill in how often you want backups generated.

Need more help? Contact us!

Custom port for SFTP

It is needed a port field in the SFTP configuration form. I've implemented the changes locally (it is easy if you take the sftpip variable as base), so I can contribute if you wish.

How to restore it?

I'm trying to restore the backup.
I'm trying to upload it, tried as restore, tried as copy of existing database.
Doesn't work.

I can't find how to restore it.

I need to restore a database with a different name, but I have tried both with correct name and the different one.
I'm using Odoo 8 (installed 10 days ago)

Back up was working fine and then suddenly stopped

i'm running a cloud server with different installation of odoo servers and all backups are working fine except on project , it's backup was working fine till 08-02-2016 and with no reason stopped i just noticed now , the backup is scheduled every day at 18:00:00 GMT
here is the log file :
ERROR xxxx openerp.addons.base.ir.ir_cron: Call of self.pool.get('db.backup').schedule_backup(cr, uid, *()) failed in Job 11
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo_xxxxx\server\openerp\addons\base\ir\ir_cron.py", line 138, in _callback
File "C:\Program Files (x86)\Odoo_xxxxx\server.\openerp\api.py", line 250, in wrapper
File "C:\Program Files (x86)\Odoo_xxxxx\server\openerp\addons\auto_backup\backup_scheduler.py", line 155, in schedule_backup
NameError: global name 'logger' is not defined

Here is what we got instead: Error reading SSH protocol banner

Hi
Went i try to test sftp connection i receive this message : Here is what we got instead:
Error reading SSH protocol banner
Environnement:
-> Odoo 10
-> Python 2.7
-> Pysftp : 0.2.8 (i have downgrade from 0.2.9 to 0.2.8 because i was facing the issue No hostkey? #47)

Thanks i in advance for your help !

bug2
bug1

ValidateError

Hi Yenthe666,
Thanks for nice module, I was install auto backup, when I configure it's always said:

ValidateError

Field(s) `` failed against a constraint: Error ! No such database exists!

and my log:

2015-10-24 04:54:33,413 21714 ERROR lamnguyen openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 944, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 345, in old_api
result = method(recs, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 4092, in create
record = self.browse(self._create(old_vals))
File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 481, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 4283, in _create
recs._validate_fields(vals)
File "/opt/odoo/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/models.py", line 1272, in _validate_fields
raise ValidationError('\n'.join(errors))
ValidationError: ('ValidateError', u'Field(s) `` failed against a constraint: Error ! No such database exists!')

No module named service

Hey On installing, Its giving me an error:

ImportError: No module named Service.
Can you help?

License

Where is the license file ? It would be great if there is one. I'm assuming it's using MIT license but I could be wrong

Database not create

Hi ,
i have configure my module like your tuto this is a screen
image
image

and i CONFIGURING THE AUTOMATED ACTION:
image

but i don't find my database in
/home/odoo/backups

Backup module stop working

Hi Yen,

Thank you so much for this plugin.
I've been using it a lot.

Recently though on all the installed instance, the backup is not working.
It was working before. and it is working on new installation.
I do not understand why I don't have the access anymore.

If I go to the database/manager url, I can do a manual backup.

If I try to add a new backup configuration. the system tell me that the database name does not exist when it does.

Any idea on what to do or look for will be great.
Back up is very important especially for my production instances. Looking forward for any help on this

in the log I get this error message.

2017-08-02 12:18:51,548 3754 ERROR marco odoo.addons.base.ir.ir_cron: Call of self.env[u'db.backup'].schedule_backup(*()) failed in Job 11
Traceback (most recent call last):
File "/opt/marcopolo/marcopolo-server/odoo/addons/base/ir/ir_cron.py", line 119, in _callback
getattr(model, method_name)(*args)
File "/opt/marcopolo/custom/addons/auto_backup/models/db_backup.py", line 138, in schedule_backup
db_list = self.get_db_list(rec.host, rec.port)
File "/opt/marcopolo/custom/addons/auto_backup/models/db_backup.py", line 62, in get_db_list
db_list = execute(conn, 'list')
File "/opt/marcopolo/custom/addons/auto_backup/models/db_backup.py", line 48, in execute
res = getattr(connector,method)(*args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in call
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1591, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 794, in close
raise Fault(**self._stack[0])
Fault: <Fault AccessDenied: 'Access denied'>

Increase the Chinese translation of documents,

Hello

  1. Increase the Chinese translation of documents,
    2, is only part of your document, if I can not be translated to other translations are made available,

Can be made of the following places, such as the translation of documents in
auto_backup\i18n\zh_CN.po

such as:

Local backup configuration
Auto. Remove Backups

Warning: Use SFTP with caution! This writes files to external servers under the path you specify.

Write to external server with sftp

Automatic backups of the database can be scheduled as follows:

Go to Settings / Technical / Automation / Scheduled Actions.
Search the action named 'Backup scheduler'.
Set the scheduler to active and fill in how often you want backups generated. 

Need more help? Contact us!

installing pysftp breaks openssl and odoo with it (Linux Ubuntu 16.04.3 LTS)

i'm writing this issue to help any one has got the same error

platform:
Odoo 10 enterprise
Linux Ubuntu 16.04.3 LTS
Steps to reproduce
1- pip install pysftp
2- restart odoo server
3-odoo server doesn't start and no error in log
4-try to start odoo from command line
and got that error

SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

work around
1- need to uninstall pyOpenSSL and then reinstall it
unfortunately pip didn't work with me
i had to use
apt-get --auto-remove --yes remove python-openssl
then
sudo pip install pyOpenSSL==16.2.0
now restart odoo
it worked!
you can then install auto_backup module and it works fine

did any one had a similar problem?
is there is any way to avoid it from the beginning

Can't access backup after setup

Hello,

Due to changed view of Odoo 9, now I can't access to backup configuration. Can you please show me how to access Auto Backup config on Odoo 9?.

Thank you

V9 Backups every few seconds on initial setup

While first configuring, I set the scheduler to run on weekdays, and to repeat missed. I noticed the next scheduled run date was in the past (2010), but didn't think much of it. After saving the settings, I hit the run manually button once and it started generating backups about one every 10 or 15 seconds. I tried to change the repeat missed option and save the record, but kept getting an error message that the cron job was executing. I finally got it to stop by stopping the odoo server, then hitting the save button, then restarting the odoo server.

No hostkey?

I get this error, how can I fix that?

Here is what we got instead:
No hostkey for host backup.myserver.ch found.

But I think my configuration is correct, because I have other servers that works fine with this module

'Configure Backup' submenu disturbs 'General Settings' [9.0]

In v9.0 menu-item 'General Settings' has no submenu's anymore. This menu-item doesn't work anymore when auto_backup module is installed because this is a submenu-item.

A solution is to remove menu-item 'Configure Backup' as a submenu from 'General Settings'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.