Commit Graph

209 Commits

Author SHA1 Message Date
eee77079a2 dsnap-sync: update error handling from function calls
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:52 +02:00
e4a2a503fc tape-admin: 0.0.10 version bump
* update verbosity handling
* mount_tape(): update ltfs_wipe and ltfs_format on override

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:52 +02:00
04a712b663 tape-admin: bugfix
- ltfs_reformat(): tape needs to be unmounted before format call
- ltfs_umount(): be precise, if tapes mountpoint is in use
- parse_params(): improve error handling

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:52 +02:00
a4e6d3b42e tape-admin: respect 'tape in use' in ltfs_unmount
* signal error, since tape can't be used for backup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-09 11:38:30 +02:00
f417a912ef dsnap-sync: type cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-05 23:55:24 +02:00
3d5f496b05 tape-admin: adapt parse options
* prepare option for remote execution via ssh

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-05 23:54:27 +02:00
31a6d467ef tape-admin: new functionality, version bump
* get_mediapool_name(): extract mediapool for given volume_name
* ltfs_reformat(): wipe given volume_name and remaster for LTFS
* media_change(): update lastwrite date for new volume_name
* mtx_unload(): write only once to ERRFILE
* parse_params(): update for given new functionality, reorder
* prepare options for remote calls (ssh)
* typo updates

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-03 17:00:39 +02:00
7577a52840 tape-admin: introduce media-change
* media_change(): Update RetensionDate for last written Tape in given Pool
  new backup-job will use next free tape from this Pool

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-01 13:01:36 +02:00
2275aac7e6 dsnap-sync: correct handling of selected_config pseudo-array
* assign/prepare snapper_active_$i='yes' to selected configs

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-01 13:01:36 +02:00
e1ca526cff tape-admin: improve functionality
* 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>
2018-09-28 19:28:30 +02:00
3f00ef6702 dsnap-sync: rework BTRFS_PIPE handling
* 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>
2018-09-28 19:28:21 +02:00
6dcd0f7b45 dsnap-sync: make snapshot-name a variable
* $snapper_snapshot_name: snapper has hardcoded the name 'snapshot'

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-24 20:54:45 +02:00
3552e96eef dsnap-sync: new fuctionality
* 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>
2018-09-24 20:49:11 +02:00
7c82f85585 dsnap-sync: improve handling of btrfs-archive
* handle mounting of correct volume-name
* get_archive_last_sync_id(): find corresponding synced id
* get_snapper_last_sync_id(): optional search for matching tapeid
* run_config_preparation(): harden init of snapper_target_sync_id
* run_backup():
  - correct itaration in multi config szenario
  - adopt verbosity messages
  - extend logic to eleminate sending of unnecessary streams
  - correct handling of remote transfer of archive streams
* code cleanup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-22 21:36:05 +02:00
d4f725d0c9 dsnap-sync: code cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-22 21:36:05 +02:00
e2a324eab7 dsnap-sync: resolve bug when sending incremental snapshots
* 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>
2018-09-22 21:36:05 +02:00
c65ed5d4af tape-admin: improve handling while mounting correct media
* mount_tape(): verbosity messages when mounting mediapool member tapes
* adapt verbosity of ltfs mounts

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-22 21:36:05 +02:00
f105a525ae tape-admin: binary inclusion
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 20:52:22 +02:00
fda862c6e9 Merge: update directory structure
* remove src
* commit bin, etc

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 20:16:55 +02:00
18de780b6d Delete dsnap-sync 2018-06-01 17:17:47 +02:00
8012b67bd5 dsnap-sync: rebase the project tree 2018-06-01 17:08:24 +02:00
4c694eb6f3 dsnap-sync: rename project and introduce the fork
o distict the dash version from original work of Wes Barnett
o circumvit any name clashes
2018-06-01 15:21:04 +02:00
ae53e1c6ad snap-sync: update year in Copyright 2018-06-01 14:53:29 +02:00
Toshifumi NISHINAGA
cf31ec569b Fix duplicated variable $i
Please improve this patch, because this is dirty hack.
2018-03-30 03:59:45 +09:00
4951623980 snap-sync: 0.5.2.2 bump minor version 2018-02-06 18:16:46 +01:00
68a29f1d5d snap-sync: enhance verify_snapper_structure
- 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>
2018-02-06 18:16:35 +01:00
cb836bed8b snap-sync: 0.5.2.1 bump minor version
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-19 16:38:47 +01:00
2e5d8a2138 snap-sync: improve batch processing
- be precisely if waiting for snapper to include new snapshot in
  structure
- adapt pv command options
2018-01-19 16:38:33 +01:00
22954982cb snap-sync: correct bug in snapper config handling
- exclude sync for given config, if we find multiple instances
  of already synced snapshots

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-19 16:31:55 +01:00
4824959c2c snap-sync: make graphical notification via DBUS selectable
- introduce new configuration option --nonotify
- DBUS notificaton dialog only in interactive mode
2018-01-19 16:31:41 +01:00
b91b1e0cc0 snap-sync: enable remote syncing to selectable port
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-19 16:30:44 +01:00
108a9efc1d snap-sync: enable remote syncing to selectable port
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-19 14:22:25 +01:00
463e91af6a snap-sync: 0.5.2 bump version
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-17 18:33:36 +01:00
15fecae9b4 snap-sync: improve remote processing
- be more verbose advertising remote host
- require existence of selected snapper config

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-17 18:27:40 +01:00
655b159673 snap-sync: improved parse_params
- backupdir
- target
- uuid

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-17 18:25:14 +01:00
bd10895634 snap-sync: itroduce parameter for snap-sync template
- 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>
2018-01-17 18:22:15 +01:00
36964526f8 snap-sync: improve flag handling (parse_params)
- donotify
- do_pv_cmd

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-01-17 18:17:58 +01:00
6f05af8620 snap-sync: bug backupdir 2017-11-29 01:48:48 +01:00
660f3734c6 snap-sync: reflact snapper, call convention update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2017-11-24 13:58:43 +01:00
ae000058ac snap-sync: improve parse_params()
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2017-11-24 13:58:43 +01:00
8a57d7807d snap-sync: 0.5.1 bump version 2017-11-22 21:59:20 +01:00
3f3c38d9df snap-sync: Copyright update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2017-11-22 21:59:19 +01:00
09d5f419a5 snap-sync: run_config() allow refine of backupdir
- 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!
2017-11-22 21:59:19 +01:00
cae12a7bcb snap-sync: get_answer_yes_no update, batch/interactive option
- rework get_answer_yes_no() with preselection value
- update parse_params to use --interactive and --batch option
  keep --noconfirm for history
2017-11-22 21:59:19 +01:00
c6de0dec80 snap-sync: introduce cleanup() function
- for trapkill: call cleanup function
- remove temp-dirs
2017-11-22 21:59:19 +01:00
eac70fc001 snap-sync: parse_params update, reduce log-entry verbosity 2017-11-22 21:59:19 +01:00
9002e502c4 snap-sync: apply snapper description variables
- destinguish three states (running, synced, finished)
- adapt handling where needed
2017-11-22 21:59:19 +01:00
e3d052dc09 snap-sync: cleanup snap_sync_options, snapper call (long option name) 2017-11-22 21:59:19 +01:00
ec4723d65d snap-sync: btrfs-send/btrfs-receive pipe handling
- 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
2017-11-22 21:59:19 +01:00
62a33aa88b snap-sync: replace 'basename' with shell inline function 2017-11-22 21:59:19 +01:00