* show UTC in in verbose messages of function calls
that is the format of date string in the JSON file
* date_iso_to_seconds: correct date_string
* get_mediapool_retensiondays(): new function
* add_retensiondays(): new function
* get_retensiondays(): new function
* update_mediapool_retensiondays(): new function
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
* redirect any output of btrfs send/receive to a PIPE
* on failure, output saved messages to this PIPE
* cleanup PIPE on program termination
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
* parse_flags: introduce mode (full | incremental)
so you can force a full snapshot sync
* run_backup: update description of btrfs send '-c' flag vs '-p'
* run_finalize: ignore stderr when killing snapperd
* btrfs send: handle return code 127
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
* run_backup(): btrfs send needs valid parent
if last_sync id on target does not match id on source, use a valid
common sync_id
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
- harden testings when creating snapper structure on target
- reorder function get_config
- remove tee to PIPE
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
- when creating a snapper structure on target system
use the defined snap-sync template (default search-path /etc/snapper/config-templates)
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
- in interactive mode: ask user to change/keep given backupdir
- introduce get_config()
get value from key/value pair in targets snapper config file
- introduce set_config()
update key/value pair in targets snapper config file
- use BTRFS_PIPE to redirect btrfs messages. Rely on retrun status
anything >0 signals a pipe error!
- snapper is using hardcoded subvolume name to store its ro snapshots
variable snapper_snapshots holds it (.snapshots)
- new optional progress visualiation (via pv)
- more robust error handling
rely on btrfs-send/btrfs-receive exit code
- function get_answer_yes_no(): dialog requesting user feedback
- function check_snapper_failed_ids(): call cleanup as needed
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
- predefine a backupdir. This path is relative to the backup_root.
It will be created as a subdirectory on target disk if necessary.
- parse_params(): accept lowercase option --target, --uuid
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
- create and verify snapper compatible structure on target host
- create snapper config (snap-$selected_config) on target host
if not already available. use a snap-sync template.
- change userdata for snapper listings on target config
subvolid, uuid and hostname reflact the values from the source system
- introduce a snapper template (/etc/snapper/config-templates/snap-sync)
- adapt Makefile to support an initial snap-sync template
per default, this templates excludes snap-sync backup configs
from timeline and cleanup tasks
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>