Skip to content

fix(backup): include receipts and avatars from UPLOAD_FOLDER - #885

Merged
evilguy4000 merged 1 commit into
DRYTRIX:developfrom
jayhemnani9910:fix/backup-upload-folder
Nov 17, 2026
Merged

evilguy4000 merged 1 commit into
DRYTRIX:developfrom
jayhemnani9910:fix/backup-upload-folder

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

The full backup (Admin > Backups, flask backup_create, scheduled backups) leaves out expense receipts and user avatars, so they are lost after a restore.

create_backup zips only app/static/uploads. Receipts and avatars are saved under UPLOAD_FOLDER (/data/uploads by default, its own app_data volume in Docker), so they never go into the archive. The backups page says uploaded files are included.

The archive now also has UPLOAD_FOLDER under data_uploads/, without the backups folder that sits inside it by default, and restore_backup copies it back to UPLOAD_FOLDER. The two copy loops share one helper.

Added tests/test_backup_upload_folder.py: it creates a backup with a receipt in UPLOAD_FOLDER, deletes the receipt, restores, and checks it is back. It fails without the change. The backup and import/export tests pass.

@evilguy4000
evilguy4000 merged commit f3b3593 into DRYTRIX:develop Nov 17, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 18, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants