[17.0] auto_backup: Cron: Database backup failed, UnicodeDecodeError: utf-8 codec can't decode byte 0x8b in position 690: invalid start byte

Open Beginner friendly
#3,768 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@xecanto is already working on this.

Since Oct 12, 2026.

  • #3786 by @xecanto — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
database

Research direction

Start with auto_backup/models/db_backup.py, especially the action_backup copy operation and the backup_log context shown in the traceback. Reproduce by manually running the scheduler with both pg_dump and zip backup records; inspect how the second backup is handled. Done when both formats complete without the UnicodeDecodeError; the issue names no test file.

Written by the indexing model from the issue text.

Description

bug

Module

Database Auto-Backup (auto_backup)

Describe the bug

Cron doesn't create backup if added 2 or more records Automated Backups

To Reproduce

Affected versions: 17.0.1.1.1

Steps to reproduce the behavior:

  1. Go to the Technical > Automated Backups menu item
  2. Add 2 records: 1) Backup Format - pg_dump and 2) Backup Format - zip
  3. Go to the Technical > Scheduled Actions menu item.
  4. Open Backup Scheduler cron and click on the Run Manually button

Error in the second Backup Format - zip record:
Database backup failed.

Database backup failed.

Traceback (most recent call last): File "/mnt/server-tools/auto_backup/models/db_backup.py", line 212, in backup_log yield File "/mnt/server-tools/auto_backup/models/db_backup.py", line 163, in action_backup shutil.copyfileobj(cached, destiny) File "/usr/lib/python3.10/shutil.py", line 195, in copyfileobj buf = fsrc_read(length) File "/usr/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 690: invalid start byte 
Image

Expected behavior
Create two backup

Dominant language
Python
Stars
960
Forks
1.7k
Avg merge
5d 23h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OCA/server-tools

All issues in OCA/server-tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.