Archive aborts when some target snapshots already exist
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
Archive bails out when some of the backups already exist in the target location.
I want to use `archive` to copy newly created backups from my backup disk to another location. Assume I've previously run `btrbk archive` already, and then want to update the existing archive target with new backups that have been created.
I see:
```
$ sudo btrbk archive -vn /media/backup/ /media/backup-alt/
btrbk command line client, version 0.26.0 (Sun Feb 18 16:37:08 2018)
Using configuration: /etc/btrbk/btrbk.conf
Archiving subvolumes: /media/backup/btrbk/home/home.*
ERROR: Target subvolume "/media/backup-alt/btrbk/home/home.20180213T0800" already exists, aborting send/receive of: /media/backup/btrbk/home/home.20180213T0800
ERROR: Please delete stray subvolume ("btrbk clean"): /media/backup-alt/btrbk/home/home.20180213T0800
ERROR: Error while cloning, aborting
Archived 0/1 subvolumes
WARNING: Skipping archiving of "/media/backup/btrbk/home/": At least one target aborted earlier
Completed within: 0s (Sun Feb 18 16:37:08 2018)
--------------------------------------------------------------------------------
Archive Summary (btrbk command line client, version 0.26.0)
Date: Sun Feb 18 16:37:08 2018
Dryrun: YES
Legend:
++. created directory
--- deleted subvolume
*** received subvolume (non-incremental)
>>> received subvolume (incremental)
--------------------------------------------------------------------------------
/media/backup/btrbk/home/home.*
!!! Target "/media/backup-alt/btrbk/home" aborted: Target subvolume "/media/backup-alt/btrbk/home/home.20180213T0800" already exists
/media/backup/btrbk/home-var/home-var.*
!!! Target "/media/backup-alt/btrbk/home-var" aborted: At least one target aborted earlier
/media/backup/btrbk/rootfs/rootfs.*
!!! Target "/media/backup-alt/btrbk/rootfs" aborted: At least one target aborted earlier
NOTE: Some errors occurred, which may result in missing backups!
Please check warning and error messages above.
Please delete stray subvolume ("btrbk clean"): /media/backup-alt/btrbk/home/home.20180213T0800
NOTE: Dryrun was active, none of the operations above were actually executed!
$
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported case with `btrbk archive -vn` after an earlier archive has created a target snapshot. Start by tracing the archive command's handling of an already existing target subvolume and compare it with the expected incremental update behavior. Done means newly created backups are archived without aborting because an existing target snapshot is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100