418 Commits

Author SHA1 Message Date
00e363add6 dsnap-sync: introduce error counter
* return error, if run_backup() hasn't succeeded for a selected config

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:53 +02:00
29f361939a dsnap-sync: update notifications
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:53 +02:00
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
5694278909 Examples.md: Update documentation for media-changer
* tape-admin: Howto use a media change service/timer
  it will update retension dates for the last written tape
  in the given pool

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-01 13:02:08 +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
fcfe7bb223 TODO: update task-list
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-28 19:28:30 +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
19037b63a0 TODO: update list
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-22 21:36:05 +02:00
ab4113299b PKGBUILD: debian and ARCH-Linux build-files
* debian: subdirectory and config-files
* debian: reference update
* arch:   PKGBUILD reference update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-22 21:36:05 +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
71bc32d31b Markdown: remove trailing-whitespace
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 20:05:41 +02:00
629786d9ec Merge branch 'wip-d2d'
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 19:35:03 +02:00
d6fffcffe6 dsnap-sync: 0.5.9 version bump
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 18:12:57 +02:00
156bc7fa9f dsnap-sync: typo cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 17:36:15 +02:00
3469000512 dsnap-sync: cleanup verify_snapper_structure()
* only create target path, if base_path isn't empty

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 17:36:15 +02:00
82b698750e Markdown: documentation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 17:36:06 +02:00
f52ff68318 dsnap-sync: streamline info selection for backup medium
* get_media_infos(): parse infos for backup medium

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
291924df90 dsnap-sync: update handling of incremental snapshot sync
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
c6c12ac9ea dsnap-sync: pseudo array for fs_type adaption
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
a41f00f10e dsnap-sync: adapt dryrun message layout
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
7a5951231e dsnap-sync: introduce ionice
* use I/O sceduling optons (class and priority)
* make usage optional

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
99b4eb728c dsnap-sync: enable remote btrfs-stream to remote tape
* get_tape_infos()
* run_backup()
* run_finalize()

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
a8c00b6c1a dsnap-sync: rework structure for multiple configs
* minor version bump to 0.5.9.4
* use XDG_RUNTIME_DIR for temp files
* use pseudo array for selected_configs
* update run_backups()

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
b3e94be864 dsnap-sync: handle tape attributes
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
c426ca5f6d dsnap-sync: code cleanup
* get_sanpper_sync_id() (arg: snapper_config, remote)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
a13ed29285 dsnap-sync: support full and incremental updates for btrfs-archive
* use snapper_sync_id as global variable
* introduce snapper_backup_type
* introduce btrfs streams to be saved on no btrfs filesystems
  use stream files to holding the data
* get_archive_last_sync_id()
* check common snapper sync id's in source and target
* typo cleanup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
3ff5dc380a dsnap-sync: introduce selectable backup type
* snapper_backup_type (btrfs-snapshot | btrfs-clone | btrfs-archive)
* refine a general target media (disk or LTOFS tape)
* refine a general backup directroy (on disk or on LTOFS tape)
* introduce selectable mediapool
* introduce selectable volumename
* introduce get_tape_infos()
* introduce select_target()
  this obsoletes select_disk_target()
* rename get_snapper_config_type() to get_snapper_backup_type()
* incorporate tape-admin wrapper
* run_backup(): adapt btrfs send to just save the stream to a file on tape

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
8b606c90da dsnap-sync: update documentation for tag 0.5.9
* README.md
* TODO.md
* Examples.md

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:59 +02:00
3fa9655950 dsnap-sync: 0.5.9 version bump
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
de73cefdd6 Makefile: update default target locations
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
86b3873651 tape-admin: extended functionality
* check_prerequisites(): test for needed helper programs
* get_mediapool_names(): introduce new function
* get-lastwrite(): introduce new function
* get_poolmember_next(): handle selection of next tape
* mount(): handle ltfs and mtx calls in a correct order
* mount_tape(): check that mounted tape is member of selected mediapool
* ltfs_label(): use mkltfs to format and partitionin a given tape
* update_lastwrite()
* update_retensiondate()
* date_iso_to_seconds(): parse and format date-string
* date_seconds_to_iso(): parse and format date-string
* date_string_to_iso(): parse and format date-string
* typo cleanups
* update sample MediaPools.json file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
3a33a8f83e tape-admin: rename tape-changer/ltfs administration wrapper
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
ec121aecd1 type_admin: introduce media-changer / tape admin wrapper
- tape_admin: helper script to handle common tape handling routines
- mtx: is used for media-changer functions
- json: define media-pools, corresponding volume-names and attributes

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
cf2de4d984 dsnap-sync: align calulation for size in GiB
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00
afb7702391 dsnap-sync: btrfs send/receive
* asure we have matching source and target subvol id's
  if we want to send only the differences

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-09-21 15:53:58 +02:00