missing external drive at borgmatic create stops backup (borg create continues) #343

Closed
opened 2020-07-26 13:20:05 +00:00 by adrinia · 2 comments

What I'm trying to do and why

Make a backup process that includes directories on an external drive when present and just skips these directories when the drive is not mounted. If the external drive is not mounted the procedure should just skip those dirs and continue, like when i call borg create under the same circumstances.

Steps to reproduce (if a bug)

location:
source_directories:
- /Users/anders/Documents/
- /Volumes/klumpen3/dokument/

one_file_system: true

repositories:
    - AAAAAAAA@AAAAAAAA.repo.borgbase.com:repo

exclude_if_present: .nobackup

storage:
encryption_passphrase: "AAAAAAAA"

compression: lz4

umask: 0077

lock_wait: 5

archive_name_format: '{hostname}-documents-{now}'

retention:
keep_within: 3H

keep_minutely: 60

keep_hourly: 24

keep_daily: 7

keep_weekly: 4

keep_monthly: 6

keep_yearly: 1

prefix: sourcehostname

consistency:
checks:
- repository
- archives

check_last: 3

Actual behavior (if a bug)

Ensuring legacy configuration is upgraded
/Users/anders/.config/borgmatic/config.yaml: No commands to run for pre-everything hook
/Users/anders/.config/borgmatic/config.yaml: No commands to run for pre-backup hook
ncok21b1@ncok21b1.repo.borgbase.com:repo: Creating archive
ncok21b1@ncok21b1.repo.borgbase.com:repo: Error running actions for repository
[Errno 2] No such file or directory: '/Volumes/klumpen3/dokument/'
/Users/anders/.config/borgmatic/config.yaml: No commands to run for on-error hook
/Users/anders/.config/borgmatic/config.yaml: Error running configuration file
/Users/anders/.config/borgmatic/config.yaml: No commands to run for post-everything hook

summary:
/Users/anders/.config/borgmatic/config.yaml: Error running configuration file
ncok21b1@ncok21b1.repo.borgbase.com:repo: Error running actions for repository
[Errno 2] No such file or directory: '/Volumes/klumpen3/dokument/'

Need some help? https://torsion.org/borgmatic/#issues

Expected behavior (if a bug)

I would like borgmatic to still create the archive even at times when some directories are missing. Like when I do the borg create, this is the output I get

Creating archive at "AAAAAAA@AAAAAAA.repo.borgbase.com:repo::AAAAAAA-2020-07-26T15:15:13"
/Volumes/klumpen3/dokument: [Errno 2] No such file or directory: '/Volumes/klumpen3/dokument'
Remote: Storage quota: 422.74 GB out of 4.00 TB used.
Remote: Storage quota: 422.74 GB out of 4.00 TB used.

But the archive named AAAAAAA-2020-07-26T15:15:13 is still created. When borgmatic is run, the archive is not created.

Other notes / implementation ideas

Environment

borgmatic version: 1.5.9

borgmatic installation method: brew install borgmatic

Borg version: Borg 1.1.11

Python version: Python 3.7.0

operating system and version: MacOS Catalina 10.15.6

#### What I'm trying to do and why Make a backup process that includes directories on an external drive when present and just skips these directories when the drive is not mounted. If the external drive is not mounted the procedure should just skip those dirs and continue, like when i call borg create under the same circumstances. #### Steps to reproduce (if a bug) location: source_directories: - /Users/anders/Documents/ - /Volumes/klumpen3/dokument/ one_file_system: true repositories: - AAAAAAAA@AAAAAAAA.repo.borgbase.com:repo exclude_if_present: .nobackup storage: encryption_passphrase: "AAAAAAAA" compression: lz4 umask: 0077 lock_wait: 5 archive_name_format: '{hostname}-documents-{now}' retention: keep_within: 3H keep_minutely: 60 keep_hourly: 24 keep_daily: 7 keep_weekly: 4 keep_monthly: 6 keep_yearly: 1 prefix: sourcehostname consistency: checks: - repository - archives check_last: 3 #### Actual behavior (if a bug) Ensuring legacy configuration is upgraded /Users/anders/.config/borgmatic/config.yaml: No commands to run for pre-everything hook /Users/anders/.config/borgmatic/config.yaml: No commands to run for pre-backup hook ncok21b1@ncok21b1.repo.borgbase.com:repo: Creating archive ncok21b1@ncok21b1.repo.borgbase.com:repo: Error running actions for repository [Errno 2] No such file or directory: '/Volumes/klumpen3/dokument/' /Users/anders/.config/borgmatic/config.yaml: No commands to run for on-error hook /Users/anders/.config/borgmatic/config.yaml: Error running configuration file /Users/anders/.config/borgmatic/config.yaml: No commands to run for post-everything hook summary: /Users/anders/.config/borgmatic/config.yaml: Error running configuration file ncok21b1@ncok21b1.repo.borgbase.com:repo: Error running actions for repository [Errno 2] No such file or directory: '/Volumes/klumpen3/dokument/' Need some help? https://torsion.org/borgmatic/#issues #### Expected behavior (if a bug) I would like borgmatic to still create the archive even at times when some directories are missing. Like when I do the borg create, this is the output I get Creating archive at "AAAAAAA@AAAAAAA.repo.borgbase.com:repo::AAAAAAA-2020-07-26T15:15:13" /Volumes/klumpen3/dokument: [Errno 2] No such file or directory: '/Volumes/klumpen3/dokument' Remote: Storage quota: 422.74 GB out of 4.00 TB used. Remote: Storage quota: 422.74 GB out of 4.00 TB used. But the archive named AAAAAAA-2020-07-26T15:15:13 is still created. When borgmatic is run, the archive is not created. #### Other notes / implementation ideas #### Environment **borgmatic version:** 1.5.9 **borgmatic installation method:** brew install borgmatic **Borg version:** Borg 1.1.11 **Python version:** Python 3.7.0 **operating system and version:** MacOS Catalina 10.15.6
adrinia changed title from missing external drive at borgmatic create yields error (borg create yields warning) to missing external drive at borgmatic create stops backup (borg create continues) 2020-07-26 13:20:30 +00:00
Author

I've found this
https://torsion.org/borgmatic/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server/

It seems like this solves my problem, should have read that before posting. I don't know how to delete this issue.

I've found this https://torsion.org/borgmatic/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server/ It seems like this solves my problem, should have read that before posting. I don't know how to delete this issue.
Owner

I'm glad to hear that the soft failure feature might solve your problem! If it turns out that it does not, please do let me know.

I'll go ahead and close this issue.

I'm glad to hear that the soft failure feature might solve your problem! If it turns out that it does not, please do let me know. I'll go ahead and close this issue.
witten added the
question / support
label 2020-07-27 03:35:22 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
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: borgmatic-collective/borgmatic#343
No description provided.