Commit Graph

183 Commits

Author SHA1 Message Date
3a6ba6b0af dsnap-sync: improve error handling in verify_snapper_structure()
- snapshot path needs to be a btrfs inode

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-21 16:14:21 +01:00
5109f09da4 dsnap-sync: update handling in run_config_preparation()
- when you take regular btrfs-snapshots to a remote system, the
  location of the remote "backup_root" is saved as parameter SUBVOLUME
  in the constucted snapper-config.
  In case you need to make a interactive backup/clone to a different
  target, the commandline options need to have priority, thus
  overriding the SUBVOLUME default.

- in verbose mode, show the result of the constructed backupdir and backup_root

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-21 16:13:34 +01:00
5cd429b8d3 dsnap-sync: typo correction
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-21 15:51:04 +01:00
2a9bc7e733 dsnap-sync: adapt ssh handling
- on slow systems, multiple ssh calls in a row might fail without a
  suitable timegap. To overcome this, a short sleep doesn't hurt.

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-21 15:46:17 +01:00
07e9de0035 tape-admin: rebase volume_serial initialization in ltfs_format()
* if ltfs_format does not receive the volume_serial as an argument
  extract the serial number part from the tape name

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-03 15:27:57 +01:00
b409a67a19 tape-admin: typo cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-03 15:00:49 +01:00
7042da9928 tape-admin: handle return-code of mkltfs calls in ltfs_wipe()
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-12-03 15:00:35 +01:00
f7f759ae8f tape-admin: rework ltfs reformat and wipe
* be verbose, if requested
* handle return codes for function call
* to re-format an already partitioned tape, its need to be wiped first
* just simply removing data from tape does not free the occupied space
  thus, we need to wipe it and format again to get full capacity of
  the tape

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 13:18:29 +01:00
4222c97a69 tape-admin: improve verbose output when calling via --mount
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 12:05:19 +01:00
184bc7996d tape-admin: fix loop error for mtx_unload()
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 11:40:21 +01:00
e1bc9f5d69 tape-admin: improve verbosity output
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 10:35:11 +01:00
3e36474317 tape-admin: cleanup ERRFILE handling
* remove stale error-file
* mtx shouldn't write to stdout

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 10:33:08 +01:00
9a952e8f50 tape-admin: print function-name with verbosity-level 1
* cleanup typo
* be consistent on printing the function name

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-29 09:52:31 +01:00
924191483f dsnap-sync: update modification for snapper metadata
* use "dsnap-sync" as cleanup-algorithem which will inhibit unwanted
  deletion of backups

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:51:24 +01:00
d69dc5444a dsnap-sync: be explicit when transfering info.xml metadata
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:50:35 +01:00
1d11065948 dsnap-sync: be more precise on output
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:50:06 +01:00
e1a4777e6c tape-admin: 0.0.11 version bump
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:45:36 +01:00
e511c382ee tape-admin: enable function mtx-status
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:44:06 +01:00
10d9c40182 tape-admin: rework ltfs-reformat
* force reformatting for given tape
* wipe() does not make sence, since the used space will not be freed
  without a format

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-11-22 16:42:00 +01:00
7d214948cc tape-admin: suppress mtx output
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 18:13:51 +02:00
ed4bf33f10 dsnap-sync: 0.6.3 version bump
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:53 +02:00
4e7079e62b dsnap-sync: improve error handling
* run_media_infos(): be precise while mounting tape
* run_backup(): don't treat empty btrfs steam as a showstopper
* run_finalize: sleep loop update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2018-10-12 12:31:53 +02:00
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
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