First of all, thank you for the addon. I have been using it for a few years and recently saved me from a lot of headaches.
I used to use the addon on a server where both odoo and postgres where running on the same server (localhost). I now migrated
to two docker containers, one for odoo and one for postgresql. The issue I am facing is that the backups are 0 bytes.
I've searched the issues so I will list some of the common questions:
- I do not use odoo.sh, it is self hosted
- PostgreSQL is on another host
- My configuration uses "localhost" as the host with port 8069 (This was not clear from the documentation)
but I have also tried to use the host of the postgresql database
- Database size of the ZIP file (before I migrated servers) was 455MB
- Just to confirm, my database does work; Odoo correctly connects to my remote database
- I've modified the configuration similar to what I've had before; multiple workers and modified the default cpu time
- I confirm that the port in the backup configuration is correct
- I confirm that the database name in the backup configuration is correct
- The backup directory is writeable by odoo (hence also the 0byte files)
- I use the latest commit from 2 years ago (https://github.com/Yenthe666/auto_backup/tree/14.0)
However, I do have to mention that before I still used an older version. I only updated after I experienced
the issue and also because I got a deprecation warning for osutil.tempdir which was solved in the last update.
Configuration:
Host: localhost
Port: 8069
Database: (name of database)
Backup dir: /var/lib/odoo/backups/
Type: zip
Note: there is no mention of the db host and port; but I assume you fetch this information from the odoo.conf anyway?
Symptoms:
I start the backup, the 0 byte zip file is almost instantly created. No errors in the console
2024-02-27 09:29:31,885 41 INFO xxxxxxx odoo.addons.auto_backup.models.db_backup: DUMP DB: xxxxxxx format zip
2024-02-27 09:29:34,868 33 INFO ? werkzeug: 10.0.2.177 - - [27/Feb/2024 09:29:34] "GET /web/static/src/img/spin.png HTTP/1.0" 304 - - - -
2024-02-27 09:29:37,390 41 INFO xxxxxxx werkzeug: 10.0.2.177 - - [27/Feb/2024 09:29:37] "POST /web/dataset/call_button HTTP/1.0" 200 - 15 0.015 5.511
2024-02-27 09:29:37,496 30 INFO xxxxxxx werkzeug: 10.0.2.177 - - [27/Feb/2024 09:29:37] "POST /web/dataset/call_kw/ir.cron/read HTTP/1.0" 200 - 38 0.036 0.043
EDIT: after modifying the logger.debug to logger.error
2024-02-27 10:04:19,427 41 ERROR xxxxx odoo.addons.auto_backup.models.db_backup: Couldn't backup database xxxxx. Bad database administrator password for server running at http://localhost:8069
2024-02-27 10:04:19,427 41 ERROR xxxxx odoo.addons.auto_backup.models.db_backup: Exact error from the exception: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmp1hbll290/dump.sql', 'xxxxx') error 1
From the above error it looks like the pg_dump does not consider the host of the database?
First of all, thank you for the addon. I have been using it for a few years and recently saved me from a lot of headaches.
I used to use the addon on a server where both odoo and postgres where running on the same server (localhost). I now migrated
to two docker containers, one for odoo and one for postgresql. The issue I am facing is that the backups are 0 bytes.
I've searched the issues so I will list some of the common questions:
but I have also tried to use the host of the postgresql database
However, I do have to mention that before I still used an older version. I only updated after I experienced
the issue and also because I got a deprecation warning for osutil.tempdir which was solved in the last update.
Configuration:
Host: localhost
Port: 8069
Database: (name of database)
Backup dir: /var/lib/odoo/backups/
Type: zip
Note: there is no mention of the db host and port; but I assume you fetch this information from the odoo.conf anyway?
Symptoms:
I start the backup, the 0 byte zip file is almost instantly created.
No errors in the consoleEDIT: after modifying the logger.debug to logger.error
From the above error it looks like the pg_dump does not consider the host of the database?