Comments (4)
If I understand it right, you need something like a "-r --resume-only" command line option, then you would be able to run btrbk by hand as soon as the USB stick is plugged in:
# btrbk -r /mnt/btr_pool/src_subvolume
while still having a daily cron job running btrbk.
I've been already thinking of implementing this, this should be pretty straight-forward.
For now, you can solve your problem by creating a separate config file for the manual run:
btrbk -c /etc/btrbk/btrbk.conf.usbdrive
/etc/btrbk/btrbk.conf.usbdrive:
volume /mnt/btr_pool
subvolume src_subvolume
snapshot_preserve_daily all
snapshot_create no
resume_missing yes
target_preserve_[...]
target send-receive /mnt/usb_stick/btrbk/
from btrbk.
I was somehow confused when writing the last comment here, as there already exists a "-r" (resume_only) feature, but the documentation was missing in the man-page.
Updated documentation in 7017e14
@chaosjug feel free to reopen this issue if this does not solve your problem
from btrbk.
This mostly solve my issue. There only one problem remaining:
When a backup is done without the USB drive, local snapshot are are not deleted even if they should. (Probably due to the error?)
When I manually start the backup with -r no snapshots are deleted:
NOTE: Preserved all backups (option -p or -r present)
So the snapshot accumulate until the USB drive is connected during a regular backup.
(@digint I don't have the rights to reopen the issue)
from btrbk.
If a target is not reachable, btrbk refuses to delete the snapshots. The reason for this is that one of the snapshots is needed as parent for incremental backup, and btrbk can not know which one this is if the target is not reachable.
With the -r option (resume-ONLY), no snapshots or backups are deleted.
For now, the only way to accomplish this is having two configs, one for cron and one for manual, e.g.:
/etc/btrbk/btrbk_cron.conf (only create snapshots):
volume /mnt/btr_pool
subvolume src_subvolume
snapshot_preserve_daily all
snapshot_create no
/etc/btrbk/btrbk_manual.conf (perform backups and cleanup):
volume /mnt/btr_pool
subvolume src_subvolume
snapshot_preserve_[...]
target_preserve_[...]
snapshot_create no
resume_missing yes
target send-receive /mnt/usb_stick/btrbk/
Maybe I'll implement something like "cleanup-only" option one day, but I think it's not as simple as it sounds...
from btrbk.
Related Issues (20)
- Suggestion: Add send_compressed_data to btrbk.conf.example HOT 2
- btrfs send failing, empty stream is not considered valid HOT 1
- send_protocol for old volume
- Fix clean command suggestion when using non-default port for remote targets
- Only transfer snapshots HOT 2
- btrbk prune doesn't work if two targets are configure HOT 1
- Optional Backup Summary to the log
- btrbk cannot parse `/proc/self/mountinfo` if a mount contains space(s) HOT 2
- use an existing subvolume as source for further incremental backups HOT 3
- failed to clone extents HOT 4
- [Feature Request] Add readonly option for targets
- ssh_filter_btrbk: mbuffer validation too strict
- Every snapshot is labelled as incomplete
- Configure Cleaning HOT 1
- Clean interrupted ssh transfers
- Prevent incomplete backups from blocking progress
- Is it safe to dedupe snapshots on the server and the client?
- Is my configuration wrong? I keep getting snapshots in the wrong folder HOT 6
- Failed to fetch subvolume detail for snapshot_dir HOT 1
- Double daily backups sometimes... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btrbk.