Implement cumulative (differential) backup #94

Open
opened 2026-10-29 01:53:35 +00:00 by scossu · 0 comments
Owner

Allow to specify an option (flag) for the pkar backup CLI command that:

  1. Instead of creating a sub-directory of the destination path and making a full copy of data, metadata, and configuration, it uses the destination as the root of the backup;
  2. Only copies files in the ores directory that are not already existing;
  3. always performs a full copy of the database and configuration (cheap enough to avoid the complexity of verifying diffs).

Files are always guaranteed to be "new" even when the same file resource is updated, because they are content-addressed.

This approach allows to run the same backup repeatedly (e.g. nightly) without creating a new copy every time, and saving I/O by only copying the new files. Note that this leaves deleted files in place, even if they are purged in the source.

Allow to specify an option (flag) for the `pkar backup` CLI command that: 1. Instead of creating a sub-directory of the destination path and making a full copy of data, metadata, and configuration, it uses the destination as the root of the backup; 2. Only copies files in the `ores` directory that are not already existing; 3. always performs a full copy of the database and configuration (cheap enough to avoid the complexity of verifying diffs). Files are always guaranteed to be "new" even when the same file resource is updated, because they are content-addressed. This approach allows to run the same backup repeatedly (e.g. nightly) without creating a new copy every time, and saving I/O by only copying the new files. Note that this leaves deleted files in place, even if they are purged in the source.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ktx/pocket_archive#94
No description provided.