Exclude Time Travel history from backups

Skip usr/.time_travel during self-update user-data backups and add the same Time Travel shadow-history exclusion to default BackupService metadata.\n\nAdd focused regressions proving regular user files stay in backup coverage while Time Travel shadow repositories are omitted.
This commit is contained in:
Alessandro 2026-07-09 13:27:03 +02:00
parent bc96386260
commit 3d87998821
6 changed files with 63 additions and 0 deletions

View file

@ -22,6 +22,7 @@
- Do not bake secrets, local `.env` values, or user data into the image.
- Runtime startup must ensure `/a0/usr/uploads` exists before supervised services start.
- Runtime startup raises the soft open-file limit toward `A0_NOFILE_LIMIT` (default `65535`) before supervisord starts, bounded by the container hard limit.
- Self-update user-data backups skip Time Travel shadow history under `usr/.time_travel/` and transient Desktop agent state.
## Work Guidance

View file

@ -405,6 +405,11 @@ def should_exclude_from_usr_backup(
logger: AttemptLogger,
) -> bool:
parts = relative_dir.parts
if parts and parts[0] == ".time_travel":
logger.log(
f"Skipping Time Travel history during usr backup: {Path('usr') / relative_dir}"
)
return True
if (
len(parts) >= 6
and parts[0] == "plugins"