Commit Graph

246 Commits (f21ef824a7091d2068b049e11908714cfe3b0ab6)

Author SHA1 Message Date
Axel Burri 231a8c2fd3 btrbk: cosmetics: sort deleted subvolumes ascending in backup summary (instead of descending) 2015-05-20 21:06:01 +02:00
Axel Burri 613edab93b btrbk: implemented snapshot_create configuration option. implemented preserve_latest argument for schedule() function, which is set if no snapshot was created in order to make sure that the latest snapshot/backup is always preserved. 2015-05-20 21:06:01 +02:00
Axel Burri 2f1cec3cf5 btrbk: improved handling of deprecated configuration options 2015-05-20 21:06:01 +02:00
Axel Burri 84e41727b9 btrbk: added command line option -r (resume only) 2015-05-20 21:06:01 +02:00
Axel Burri d935bfc679 btrbk: fixed error messages of "diff" action 2015-05-19 18:50:56 +02:00
Axel Burri ab01baf4b7 btrbk: cosmetics: pass hash (non_destructive, catch_stderr) to run_cmd() for better code readability; cleanup 2015-05-19 18:48:32 +02:00
Axel Burri c23674fca8 btrbk: catch exact error from "btrfs subvolume show"; instruct user to fix ssh_filter_btrbk.sh if it rejected the ssh command 2015-05-19 18:22:55 +02:00
Axel Burri bea010dce0 btrbk, ssh_filter_btrbk.sh: set PATH=/sbin:/bin:/usr/sbin:/usr/bin and call "btrfs" instead of using absolute "/sbin/btrfs". for compatibility with all distros out there.
- debian jessie (stable): btrfs-tools-3.17-1.1: `/sbin/btrfs`
  - debian sid (unstable): btrfs-tools-4.0-2: `/bin/btrfs`
  - gentoo: sys-fs/btrfs-progs-4.0: `/sbin/btrfs`
  - arch: btrfs-progs-4.0-2: `/usr/bin/btrfs`
2015-05-18 21:18:57 +02:00
Axel Burri 5bfba3602e changed version to 0.17.1 2015-05-15 17:55:48 +02:00
Axel Burri b0b2bb99f1 btrbk: correctly log statistics of resumed subvolumes 2015-05-15 17:32:30 +02:00
Axel Burri 2d445a84cb Merge branch 'unsafe_delete_on_receive_errors' 2015-05-15 17:18:43 +02:00
Axel Burri fbe9e4c9d0 btrbk: check for stray target subvolumes before send/receive, and abort with unrecoverable error if necessary 2015-05-15 17:16:50 +02:00
Axel Burri bda8d2deb3 btrbk: cosmetics: use $vinfo->{NAME} in get_receive_targets() 2015-05-15 17:06:25 +02:00
Axel Burri d28ed97065 btrbk: assume unreachable target as clean on snapshot creation if snapshot_create_always is set 2015-05-15 13:36:18 +02:00
Axel Burri 465a3eb92e btrbk: send/receive: delete possibly left-behind garbled subvolume on failure (upstream btrfs-progs does not delete unfinished "btrfs receive") 2015-05-09 16:01:12 +02:00
Axel Burri 2034b51058 btrbk: bugfix: btrfs_subvolume_delete(): handle single targets correctly 2015-05-09 15:57:04 +02:00
Axel Burri 999bf889bc changed version to 0.17.0 (new versioning scheme using more common three-level versions) 2015-04-30 14:45:50 +02:00
Axel Burri bc930a26c8 btrbk: cosmetics 2015-04-30 14:45:41 +02:00
Axel Burri 40201c562b btrbk: log messages go to stderr instead of stdout (more consistent since btrfs-progs error messages also go to stderr) 2015-04-29 00:34:11 +02:00
Axel Burri 444fba4a50 btrbk: log DEBUG instead of WARN if run_cmd() fails. WARN messages are always printed on undef return value 2015-04-28 23:47:34 +02:00
Axel Burri 9103cbc79d btrbk: output vinfo->{PRINT} instead of {URL} in _origin_tree() 2015-04-28 21:19:46 +02:00
Axel Burri bd2ad9c258 btrbk: handle ABORTED flags on "tree" action 2015-04-28 21:19:46 +02:00
Axel Burri faf4a53e51 btrbk: quote filenames on external command execution 2015-04-28 21:19:46 +02:00
Axel Burri d860d9e5dd btrbk: allow '+' character for subvolume names 2015-04-28 21:19:46 +02:00
Axel Burri 436b1361ff btrbk: bugfix: allow relative path for subvolume; adapted documentation 2015-04-28 21:19:46 +02:00
Axel Burri fb912da448 btrbk: bugfix: allow "/" as volume name 2015-04-28 21:19:45 +02:00
Axel Burri 490dab398e btrbk: consistent snapshot filtering (cosmetics) 2015-04-28 21:19:45 +02:00
Axel Burri 466e066029 btrbk: consistently prefix all functions calling "/sbin/btrfs" with btrfs_ 2015-04-28 21:19:45 +02:00
Axel Burri 8a99adf53f btrbk: adaptions on vinfo_root: make sure a valid vinfo is in $config on each section 2015-04-28 21:19:45 +02:00
Axel Burri ea59d986d6 btrbk: always use {PRINT} instead of {URL} for logging 2015-04-28 21:19:45 +02:00
Axel Burri 927b80a388 btrbk: correctly match snapshots 2015-04-28 21:19:45 +02:00
Axel Burri 6e4e531fbd btrbk: changed vinfo creation and handling; cleanup btr_tree(); fixed action "diff" 2015-04-28 21:19:45 +02:00
Axel Burri 2f9055634e btrbk: adapted btrfs_subvolume_delete() 2015-04-28 21:19:45 +02:00
Axel Burri a7d3dac64d btrbk: fixed summary of actions "run" and "dryrun" 2015-04-28 21:19:45 +02:00
Axel Burri 157f9333e7 btrbk: bugfix: set REAL_PATH to vinfo_child only if it is confirmed 2015-04-28 21:19:45 +02:00
Axel Burri 6b00ea1741 btrbk: allow multiple identical src/target subvolumes 2015-04-28 21:19:45 +02:00
Axel Burri e25312223d btrbk: fixed action "tree" 2015-04-28 21:19:45 +02:00
Axel Burri 19c0733471 btrbk: added vinfo_cache; fixed action "origin" 2015-04-28 21:19:45 +02:00
Axel Burri 40d3f27b2e btrbk: simplified vinfo (SUBVOL_INFO holds copies of btr_tree nodes); cleanup 2015-04-28 21:19:45 +02:00
Axel Burri 3413425ed9 btrbk: added "snapshot_name" configuration option 2015-04-28 21:19:45 +02:00
Axel Burri 0068e078f2 btrbk: globally replaced %vol_info by vinfo->{VOL_INFO}, use vinfo() where applicable; changed btr_* function arguments; adapted snapshotting and send-receive 2015-04-28 21:19:45 +02:00
Axel Burri 72cbca13d7 btrbk: add rsh information to vinfo; btr_subvolume_detail() now takes real options instead of a config hash 2015-04-28 21:19:45 +02:00
Axel Burri 0a9c193d13 btrbk: filter subvolumes matching command line arguments before checking the configuration 2015-04-28 21:19:45 +02:00
Axel Burri 55358b5b5b btrbk: renamed FS_PATH with URL where applicable 2015-04-28 21:19:45 +02:00
Axel Burri e7e28c2418 btrbk: renamed variables: use $url and $path instead of $vol 2015-04-28 21:19:44 +02:00
Axel Burri 3ebb816290 btrbk: added vinfo hash: keep global subvolume detail info; new three-level versioning scheme 2015-04-28 21:19:36 +02:00
Axel Burri 8f9cafb359 btrbk: check source AND targets for determining snapshot postfix 2015-04-07 14:51:05 +02:00
Axel Burri a90033c1aa btrbk: allow "0" as subvolume name 2015-04-07 11:52:45 +02:00
Axel Burri f08ae7d362 btrbk: fixed backup summary text (cosmetics) 2015-04-04 14:55:11 +02:00
Axel Burri 7b3d9f4ea1 changed version to 0.16 2015-04-02 17:10:28 +02:00
Axel Burri 3479d780aa btrbk: option "resume_missing" defaults to "yes" 2015-04-02 17:08:03 +02:00
Axel Burri d7e9921643 btrbk: cleanup of schedule(): sort by date and date_ext instead of dedicated "sort" 2015-04-02 17:06:29 +02:00
Axel Burri bf5f74498c btrbk: bugfix: add all present backups to the schedule when checking for missing backups (which is essential for schedule() to give correct preserve/delete answers!) 2015-04-02 15:53:53 +02:00
Axel Burri f5e1f2ffb8 changed version to 0.15 2015-04-01 16:53:46 +02:00
Axel Burri 654d68713b btrbk: action tree: make use of get_receive_targets() 2015-04-01 15:06:11 +02:00
Axel Burri 5e5a5d0aac btrbk: refactored handling of "btrfs_progs_compat" option: implemented generic get_receive_targets(), which finds matches by uuid by default, or by subvolume name in compatibility mode 2015-04-01 15:05:27 +02:00
Axel Burri 2ca53296a1 btrbk: cosmetics: changed some log statements 2015-04-01 13:26:10 +02:00
Axel Burri 57db10112a btrbk: fixed finding of correct latest common snapshot when resuming backups: keep track of received subvolumes and use them for later 2015-04-01 13:25:24 +02:00
Axel Burri 956c028435 btrbk: find correct latest common snapshot when resuming backups. Note that we then chain the backups, assuming that the previous snapshot is automatically the parent for the next one, which is not always true 2015-03-31 21:45:21 +02:00
Axel Burri 679a96495a btrbk: show subvolumes names failed on send-receive in backup summary 2015-03-31 20:36:10 +02:00
Axel Burri 889d7f0289 btrbk: dont log scheduling info when checking for missing backups 2015-03-31 20:01:32 +02:00
Axel Burri 0856a8f68e btrbk: refactored backup creation: check target preserve rules before resuming backups 2015-03-31 19:08:48 +02:00
Axel Burri 81aef9e5b5 btrbk: added function get_date_tag() 2015-03-31 16:20:45 +02:00
Axel Burri bd219b7373 btrbk: resume missing backups if option "resume_missing" is set 2015-03-31 13:37:56 +02:00
Axel Burri be6547c1bd btrbk: bugfix: fixed bug when "commit_delete" configuration option is not set 2015-03-28 15:03:43 +01:00
Axel Burri 76e512117c btrbk: show correct exit code on external command failure 2015-03-26 18:45:43 +01:00
Axel Burri 75dd565de4 btrbk: removed configuration option "receive_log" in favor of printing errors from "btrfs receive" 2015-03-26 18:45:36 +01:00
Axel Burri 28ed7d65e8 btrbk: added configuration option "btrfs_progs_compat", for compatibility with btrfs-tools v3.14. Note that the common snapshots are guessed by their filenames when "btrfs_progs_compat" is set 2015-03-26 18:45:06 +01:00
Axel Burri d17d0abff5 btrbk: bugfix (blocker): btr_fs_info(): return en empty hash if subvolume at $fs_path is empty (bug introduced in: 14e675bacd) 2015-03-20 18:02:13 +01:00
Axel Burri 9f96974a5d Changed version to 0.13 2015-03-19 17:20:21 +01:00
Axel Burri 930e2cfbf0 documentation: cosmetics 2015-03-19 13:16:58 +01:00
Axel Burri bef56e59d3 cosmetics: corrected btrbk home page url 2015-03-19 12:48:09 +01:00
Axel Burri e39263588d btrbk: bugfix: allow '@' character for subvolume names (ubuntu prefixes all subvolumes with '@' in its subvolume layout) 2015-03-19 11:46:59 +01:00
Axel Burri 523b989b02 Changed version to 0.12 2015-03-13 19:38:51 +01:00
Axel Burri 89c659081a btrbk: added ChangeLog for current version 0.12-dev 2015-03-13 18:31:18 +01:00
Axel Burri b99fb4b438 btrbk: fixed btrbk origin action. keep track of known path of subvolumes in uuid_fs_map 2015-03-13 18:14:28 +01:00
Axel Burri f304133fa2 btrbk: fixed btrbk tree action (compare received_uuid instead of path match) 2015-03-13 15:33:14 +01:00
Axel Burri ca4006589f btrbk: renamed btr_subtree() to btr_fs_info() while fixing its dependencies 2015-03-13 14:40:43 +01:00
Axel Burri 7bc0efab64 btrbk: fix "path" portion of subvolume node; cleanup (unfinished) 2015-03-13 12:33:31 +01:00
Axel Burri 7497e0b561 btrbk: new implementation of btr_subtree(), using more complete information from btr_tree(). (unfinished) 2015-03-13 11:44:04 +01:00
Axel Burri 618114e717 btrbk: btr_tree(): added REL_PATH information to subvolume node 2015-03-13 11:20:47 +01:00
Axel Burri 6e2b9a68d0 btrbk: cosmetics 2015-03-11 19:19:32 +01:00
Axel Burri 02acb32d17 btrbk: fixed bug: "Use of uninitialized value $&". The bug occurred when parsing a sub-subvolume from "btrfs subvolume list" command output 2015-03-11 19:18:54 +01:00
Axel Burri 448b70b8fd Changed version to 0.11; adapted ChangeLog 2015-03-02 11:33:14 +01:00
Axel Burri aa8d153a20 btrbk: added optional subvolume argument for run/dryrun actions, for explicit selection of subvolumes to be processed. 2015-03-01 14:28:26 +01:00
Axel Burri 372ec90685 btrbk: generic input validation of command arguments 2015-02-28 13:52:38 +01:00
Axel Burri 056f6f9120 btrbk: added option -p (preserve backups) 2015-02-28 13:46:05 +01:00
Axel Burri 02f254bdb3 btrbk: fixed getopts(): removed non-existent options 2015-02-28 11:54:11 +01:00
Axel Burri bfff868bb8 btrbk: changed version to 0.10 2015-02-10 15:57:51 +01:00
Axel Burri 0a8843db90 btrbk: bugfix: keys() and values() calls to references are experimental, fixed 2015-02-10 13:32:29 +01:00
Axel Burri e84324aee4 btrbk: renamed action "execute" to "run" 2015-02-08 13:47:31 +01:00
Axel Burri e4ac3b1dd8 btrbk: bugfix: untaint arguments of diff command; fixed parsing of find-new output 2015-02-08 13:46:03 +01:00
Axel Burri c41d165ba8 btrbk: added action "origin" 2015-02-07 15:50:46 +01:00
Axel Burri 38956cf410 btrbk: cosmetics 2015-01-26 17:23:37 +01:00
Axel Burri 93ece28ee6 btrbk: fixed scheduling (correctly calculate delta-weeks); cleanup 2015-01-25 18:05:52 +01:00
Axel Burri e76ad88d65 btrbk: print different prefix for incremental/non-incremental backups 2015-01-25 17:59:55 +01:00
Axel Burri 6a0820abae btrbk: for action "info", print "btrfs filesystem usage" instead of "btrfs filesystem df/show" 2015-01-25 13:36:07 +01:00
Axel Burri 4dd89e35e1 btrbk: warn on missing ssh identity; fixed logging 2015-01-20 21:07:28 +01:00
Axel Burri 029bac98e3 btrbk: implemented action "info", executing "btrfs filesystem show/df" 2015-01-20 19:18:38 +01:00
Axel Burri 8f81547d6f btrbk: adapted backup scheme: weekly preserves first in week, monthly preserves "last weekly in month"; cleanup 2015-01-20 16:53:35 +01:00
Axel Burri 6a00736a2b btrbk: added more information on backup summary; added documentation 2015-01-17 15:34:31 +01:00
Axel Burri 5b8d4f4c18 btrbk: check for /etc/btrbk/btrbk.conf as well as /etc/btrbk.conf 2015-01-17 13:23:01 +01:00
Axel Burri 40d64c9495 btrbk: do not clean subvolume if any target has previous errors 2015-01-17 13:23:01 +01:00
Axel Burri 6793f81d50 btrbk: added strict input checking, for security sake 2015-01-17 13:23:00 +01:00
Axel Burri 08c0e59e29 btrbk: added support for ssh sources; removed automatic creation of snapdir, as this does not work with ssh (snapshot_dir now defaults to undef) 2015-01-17 13:23:00 +01:00
Axel Burri 17266d90aa btrbk: added support for ssh targets (identity file only, no password support yet) 2015-01-17 13:22:52 +01:00
Axel Burri 92ee8b0454 btrbk: added configuration option "btrfs_commit_delete" 2015-01-13 18:41:57 +01:00
Axel Burri 5299a57c2b btrbk: print summary at end of "execute" action; added option -q (quiet) 2015-01-13 17:51:24 +01:00
Axel Burri 978948f877 btrbk: added perl -T option; added signal handler; added TODO; cleanup 2015-01-13 15:17:18 +01:00
Axel Burri 3e829f6cff btrbk: removed action "clean", moving this to productive after each action "execute" 2015-01-13 13:49:18 +01:00
Axel Burri cc5fa73cf3 btrbk: use snapshot_dir from config instead of -s option 2015-01-13 12:52:29 +01:00
Axel Burri 973cebb1c7 btrbk: rewrite of backup scheme calculation, allowing to set the day of week to be preserved weekly/monthly 2015-01-13 12:38:01 +01:00
Axel Burri c445fa7970 btrbk: adapted/fixed target "clean" for refactored configuration 2015-01-12 17:56:35 +01:00
Axel Burri 1aaa72ebfe btrbk: proper input validation of config file 2015-01-12 15:46:24 +01:00
Axel Burri a269231cf9 btrbk: adapted backup creation for refactored configuration 2015-01-12 14:04:07 +01:00
Axel Burri ef5658c1b0 btrbk: adapted subvolume creation for refactored configuration 2015-01-10 16:33:01 +01:00
Axel Burri 9908ed42f0 btrbk: adapted tree action for refactored configuration 2015-01-10 16:03:47 +01:00
Axel Burri 57f4164ff9 btrbk: adapted basic checks and vol_info creation for refactored configuration 2015-01-10 16:02:35 +01:00
Axel Burri 231203e44e btrbk: refactoring of config file semantics (allow tree-style configuration): implemented new parser 2015-01-10 16:01:47 +01:00
Axel Burri eadc6c80e2 btrbk: action "clean": clean backups as well as snapshots 2015-01-09 18:39:11 +01:00
Axel Burri 912f8ad526 btrbk: added new action "clean", deleting old backups following a keep_daily/keep_weekly scheme; removed option -t, as time format needs to be fixed for action "clean" to work 2015-01-09 18:39:11 +01:00
Axel Burri 272fb6db29 btrbk: action "diff": always diff between src/target subvolume, as this works identically for snapshots as well as for received backups; enhanced visual output 2015-01-09 18:39:11 +01:00
Axel Burri 7db7c2c485 btrbk: renamed action "info" to "tree" 2015-01-09 18:39:11 +01:00
Axel Burri f3e98ced61 btrbk: corrected checks on vol_info, globally use subvol() to get a subvolume node 2015-01-09 18:39:11 +01:00
Axel Burri 51367b0e63 btrbk: bugfix: early check for svol 2015-01-09 18:39:11 +01:00
Axel Burri 299edde0d7 btrbk: improved error handling 2015-01-09 18:39:11 +01:00
Axel Burri 8930c0a87f btrbk: cleanup 2015-01-09 18:39:11 +01:00
Axel Burri c99a69a31c btrbk: allow specification of separate parent for diff 2015-01-09 18:39:11 +01:00
Axel Burri f6c134ea1b btrbk: fixed btr_tree, use it for "diff" command 2015-01-09 18:39:11 +01:00
Axel Burri a5fec23a15 btrbk: implemented "diff" command (print snapshot diffs) 2015-01-09 18:39:11 +01:00
Axel Burri 04b595a7ce btrbk: find unique name for snapshot 2015-01-09 18:39:11 +01:00
Axel Burri 915b36f7ca btrbk: operate on single subvolume instead of whole btrfs volume; added option "-s snapdir" 2015-01-09 18:39:11 +01:00
Axel Burri 6dc72f867e btrbk: operate on single subvolume instead of whole btrfs volume; added configuration option snapdir=<dir> 2015-01-09 18:39:11 +01:00
Axel Burri e9c91b1b83 btrbk: match common parents by uuid 2015-01-09 18:39:10 +01:00
Axel Burri bf40341f29 btrbk: sort output of "info" command 2015-01-09 18:39:10 +01:00
Axel Burri b2f8dd1fd6 btrbk: bugfix when trying to access non-existent voumes 2015-01-09 18:39:10 +01:00
Axel Burri 886067663c btrbk: cleanup, cosmetics 2015-01-09 18:39:10 +01:00
Axel Burri 2552cab314 btrbk: implemented "info" command 2015-01-09 18:39:10 +01:00
Axel Burri ff504b508f btrbk: changed command line semantics, accepting commands 2015-01-09 18:39:10 +01:00
Axel Burri a5ad796aeb btrbk: create all snapshots before starting any send_receive operation; cleanup 2015-01-09 18:39:10 +01:00
Axel Burri adaabb599a btrbk: added support for changelog on send-receive 2015-01-09 18:39:10 +01:00
Axel Burri 3aa6acfc6e btrbk: cleanup; bugfix 2015-01-09 18:39:10 +01:00
Axel Burri 91146da71d btrbk: added config file support (new command line option -c; changed -d debug, -p pretend flags) 2015-01-09 18:39:10 +01:00
Axel Burri 244303ebdd btrbk: build a tree from btrfs volume (for subvolume checks) 2015-01-09 18:39:10 +01:00
Axel Burri a6017460b2 btrbk: find latest common snapshot instead of latest dest snapshot 2015-01-09 18:39:10 +01:00
Axel Burri a43b8cc6db btrbk: initial revision, working for single source and multiple targets 2015-01-09 18:38:24 +01:00