]>
arthur.barton.de Git - backup-script.git/log
Alexander Barton [Mon, 24 Oct 2016 10:58:19 +0000 (12:58 +0200)]
Fix shellcheck(1) warning SC2181: "Check exit code directly"
See <https://github.com/koalaman/shellcheck/wiki/SC2181> for details.
Alexander Barton [Mon, 24 Oct 2016 09:19:33 +0000 (11:19 +0200)]
README.md: Use "job definition" instead of "system definition"
Alexander Barton [Mon, 24 Oct 2016 09:18:39 +0000 (11:18 +0200)]
Fix README.md, and add link to "homepage" at GitHub
Alexander Barton [Fri, 21 Oct 2016 10:25:14 +0000 (12:25 +0200)]
backup-script: Implement "-x"/"--no-exec" command line option
When this option is given, neither the global "setup-exec", "pre-exec",
nor the global "post-exec" coammds will be run.
Alexander Barton [Mon, 12 Sep 2016 15:33:23 +0000 (17:33 +0200)]
backup-script-wrapper: Add "success" to mail subject when everything is ok
Alexander Barton [Wed, 17 Aug 2016 13:39:28 +0000 (15:39 +0200)]
backup-audit: Enhance listing of directory changes
Alexander Barton [Fri, 22 Jul 2016 13:03:40 +0000 (15:03 +0200)]
backup-audit: Exclude /proc, /sys, and /net
Alexander Barton [Wed, 20 Jul 2016 08:24:31 +0000 (10:24 +0200)]
backup-audit: Check for changes in some directory contents
Alexander Barton [Wed, 20 Jul 2016 08:21:54 +0000 (10:21 +0200)]
backup-audit: Update list of files to check
Alexander Barton [Wed, 20 Jul 2016 07:53:36 +0000 (09:53 +0200)]
backup-audit: Don't append ”/" when checking directories manually
Alexander Barton [Mon, 18 Jul 2016 16:33:48 +0000 (18:33 +0200)]
backup-audit: Add more files to the checklist
Alexander Barton [Wed, 13 Jul 2016 13:29:51 +0000 (15:29 +0200)]
Catch SIGTERM as well as SIGINT
Alexander Barton [Tue, 12 Jul 2016 10:23:19 +0000 (12:23 +0200)]
Fix and mark several notices & warnings of shellcheck(1)
Alexander Barton [Fri, 8 Jul 2016 08:03:05 +0000 (10:03 +0200)]
backup-audit: Suppress error message when no older generation exists
Alexander Barton [Wed, 6 Jul 2016 14:33:20 +0000 (16:33 +0200)]
Don't clean up when "setup_exec" command failed
Alexander Barton [Wed, 6 Jul 2016 14:18:57 +0000 (16:18 +0200)]
backup-script-wrapper: Don't check lockfile on its own
This is done by the "backup-script" already, don't duplicate logic.
And in addition this leads to streamlined error reporting.
Alexander Barton [Wed, 6 Jul 2016 14:17:58 +0000 (16:17 +0200)]
Implement global "setup_exec" configuration option
Alexander Barton [Mon, 4 Jul 2016 14:25:03 +0000 (16:25 +0200)]
Add "backup-audit" script
This script compares backup generations and shows "relevant" changes
in the system configuration.
At the moment this includes changes to some system files and in the
list of installed (Debian-) packages. More to come!
Alexander Barton [Mon, 4 Jul 2016 14:14:39 +0000 (16:14 +0200)]
Slightly enhance "make check" ...
Alexander Barton [Mon, 4 Jul 2016 14:10:48 +0000 (16:10 +0200)]
README.md: Slightly enhance backup-script-wrapper usage information
Alexander Barton [Wed, 1 Jun 2016 09:24:04 +0000 (11:24 +0200)]
Implement new "backup_type": "disabled"
Alexander Barton [Wed, 25 May 2016 08:25:57 +0000 (10:25 +0200)]
Implement very trivial first "make check" tests
Alexander Barton [Wed, 25 May 2016 08:25:01 +0000 (10:25 +0200)]
New configuration variable "[default_]io_timeout"
Tis allows setting of the maximum I/O timeout in seconds. If no data
is transferred for the specified time then rsync will abort.
This patch also changes the default from 900 to 1800 seconds (30 min).
Alexander Barton [Fri, 20 May 2016 12:30:25 +0000 (14:30 +0200)]
Set rsync I/O timeout to 15 minutes
Alexander Barton [Fri, 20 May 2016 12:16:27 +0000 (14:16 +0200)]
User rsync option "--delete-during"
Alexander Barton [Wed, 4 May 2016 11:58:15 +0000 (13:58 +0200)]
backup-script-wrapper: Show command line
Alexander Barton [Thu, 28 Apr 2016 11:33:25 +0000 (13:33 +0200)]
Fix code that makes sure "source_root" ends with a slash
The correct variable is "source_root" (not "source", which isn't used by
subsequent commands in the script), and the code has been bogus anyway ...
Alexander Barton [Thu, 28 Apr 2016 09:07:33 +0000 (11:07 +0200)]
Correctly initialize system array when specific systems are given
Alexander Barton [Tue, 26 Apr 2016 14:54:45 +0000 (16:54 +0200)]
Fix some warning messages of shellcheck(1)
- SC1090: Can't follow non-constant source. Use a directive to
specify location.
- SC2125: Brace expansions and globs are literal in assignments.
Quote it or use an array.
- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
See <http://www.shellcheck.net>.
Alexander Barton [Tue, 19 Apr 2016 15:48:33 +0000 (17:48 +0200)]
Implement job tagging
Introduce new command line option "-t TAG"/"--tags TAG" and new job
option "[default_]tags".
Alexander Barton [Wed, 17 Feb 2016 16:13:13 +0000 (17:13 +0100)]
README.md: It is [default_]files (not "file"), plural!
Alexander Barton [Tue, 5 Jan 2016 08:52:13 +0000 (09:52 +0100)]
Update copyright notices for 2016
Alexander Barton [Thu, 4 Feb 2016 13:09:24 +0000 (14:09 +0100)]
Disable "globbing" for exclude patterns
Alexander Barton [Tue, 29 Dec 2015 09:11:05 +0000 (10:11 +0100)]
Show generation config in "nothing to cleanup" message
Alexander Barton [Tue, 24 Nov 2015 15:11:10 +0000 (16:11 +0100)]
Fix backup-status not showing result code for successful backups
This bug has been introduced by commit
e9d32c68 ("backup-status: Show
more information from stamp file"). Oops!
Alexander Barton [Tue, 24 Nov 2015 13:18:13 +0000 (14:18 +0100)]
backup-status: Show more information from stamp file
Alexander Barton [Tue, 24 Nov 2015 13:17:52 +0000 (14:17 +0100)]
Write more information to "stamp file"
Alexander Barton [Tue, 24 Nov 2015 12:21:53 +0000 (13:21 +0100)]
Update trial run message, don't call it "synchronization command"
Alexander Barton [Tue, 24 Nov 2015 12:03:58 +0000 (13:03 +0100)]
backup-status: Enhance status message
Alexander Barton [Wed, 18 Nov 2015 16:12:20 +0000 (17:12 +0100)]
Implement "scp" backup type
This backup type is handy to save router configuration files, for
example. The defaults are suitable for Cisco IOS devices.
Alexander Barton [Wed, 18 Nov 2015 15:27:34 +0000 (16:27 +0100)]
First step to support multiple "backup types"
Alexander Barton [Wed, 18 Nov 2015 15:26:09 +0000 (16:26 +0100)]
Fix more warnings of shellcheck(1), use "[[ ... ]]" instead of "[ ... ]"
Alexander Barton [Wed, 18 Nov 2015 15:24:45 +0000 (16:24 +0100)]
Fix two warnings of shellcheck(1)
Alexander Barton [Mon, 5 Oct 2015 08:41:42 +0000 (10:41 +0200)]
backup-status: Implement "--errors" to only list backups with errors
Alexander Barton [Mon, 5 Oct 2015 08:40:58 +0000 (10:40 +0200)]
backup-status: Reformat usage information
Alexander Barton [Mon, 5 Oct 2015 08:19:40 +0000 (10:19 +0200)]
Update usage information, add [-|--latest]
Alexander Barton [Thu, 1 Oct 2015 12:43:47 +0000 (14:43 +0200)]
Use relative symlinks for ZFS snapshots
This eases renaming of systems etc.
Alexander Barton [Thu, 1 Oct 2015 12:37:40 +0000 (14:37 +0200)]
rsync: Use better progress output when available (protocol version >=31)
Alexander Barton [Thu, 1 Oct 2015 12:27:39 +0000 (14:27 +0200)]
Detect rsync and its protocol version
Alexander Barton [Mon, 21 Sep 2015 12:09:04 +0000 (14:09 +0200)]
Default system excludes: Only exclude content, not directory itself
Alexander Barton [Mon, 21 Sep 2015 11:57:35 +0000 (13:57 +0200)]
Refactor list of default excludes for system backups
Alexander Barton [Mon, 21 Sep 2015 11:48:50 +0000 (13:48 +0200)]
Add "[default_]exclude_dirs_add" options
Alexander Barton [Mon, 21 Sep 2015 10:27:12 +0000 (12:27 +0200)]
backup-status: Backup directory uses configuration file name
Alexander Barton [Mon, 21 Sep 2015 10:26:40 +0000 (12:26 +0200)]
backup-status: Don't read ${conf_d}/backup-script.conf twice
Alexander Barton [Mon, 24 Aug 2015 08:39:15 +0000 (10:39 +0200)]
backup-status: Use /var/backups as default backup target
This has been implemented in commit
1af443845d1f for "backup-script",
so implement it for "backup-status", too!
Alexander Barton [Mon, 24 Aug 2015 08:24:41 +0000 (10:24 +0200)]
Filesystem summary: Use "zfs list" on ZFS filesystems
Alexander Barton [Thu, 20 Aug 2015 14:55:05 +0000 (16:55 +0200)]
Read in configuration before showing usage information
And show more configuration details on regular runs, too.
Alexander Barton [Wed, 19 Aug 2015 08:19:59 +0000 (10:19 +0200)]
backup-script-wrapper: Check for PID file ("lock file")
Check for the existence of the PID and abort if if exists file before
redirecting the output to the log file, to not garble it when an other
instance is still running.
Alexander Barton [Wed, 19 Aug 2015 08:18:18 +0000 (10:18 +0200)]
backup-script-wrapper: Sort variables alphabetically
Alexander Barton [Wed, 19 Aug 2015 08:13:29 +0000 (10:13 +0200)]
backup-status: Implement new "--latest" option
Alexander Barton [Wed, 19 Aug 2015 08:06:33 +0000 (10:06 +0200)]
backup-status: Refactor argument parsing
Alexander Barton [Wed, 19 Aug 2015 07:59:25 +0000 (09:59 +0200)]
backup-status: Correctly show "current" snapshot as newest
Alexander Barton [Tue, 18 Aug 2015 14:27:23 +0000 (16:27 +0200)]
backup-status: Use "poster -ap" when "--running" finds a running job
Alexander Barton [Tue, 18 Aug 2015 14:22:26 +0000 (16:22 +0200)]
backup-status: Implement "--running" option
This option checks if a backup is running at the moment (exit code 0)
or not (exit code 1).
Alexander Barton [Tue, 18 Aug 2015 14:02:13 +0000 (16:02 +0200)]
backup-status: Remove unused variables
"local" and "destdir" seem to be unused?
Alexander Barton [Tue, 18 Aug 2015 14:01:48 +0000 (16:01 +0200)]
backup-status: Correctly quote and initialize variables
Alexander Barton [Tue, 18 Aug 2015 10:24:16 +0000 (12:24 +0200)]
backup-status: Use exit code 2 when displaying usage information
Alexander Barton [Tue, 18 Aug 2015 10:23:50 +0000 (12:23 +0200)]
backup-status: Use same configuration search order than backup-script
Alexander Barton [Tue, 18 Aug 2015 09:22:05 +0000 (11:22 +0200)]
backup-script-wrapper: Show non-zero exit code in mail subject
Alexander Barton [Tue, 18 Aug 2015 09:21:16 +0000 (11:21 +0200)]
backup-script-wrapper: Use FQDN for mail subject
Alexander Barton [Tue, 18 Aug 2015 09:14:25 +0000 (11:14 +0200)]
backup-script-wrapper: Write a "delimiter line" to the log file
Alexander Barton [Tue, 18 Aug 2015 09:09:00 +0000 (11:09 +0200)]
README.md: Update "configuration" section
Alexander Barton [Tue, 18 Aug 2015 09:08:38 +0000 (11:08 +0200)]
Exit with code 7 when not all jobs have been run
Alexander Barton [Tue, 18 Aug 2015 09:08:03 +0000 (11:08 +0200)]
Streamline and document exit codes
Alexander Barton [Tue, 18 Aug 2015 08:48:03 +0000 (10:48 +0200)]
Return exit code 1 on errors!
Alexander Barton [Tue, 18 Aug 2015 08:46:21 +0000 (10:46 +0200)]
backup-script-wrapper: Return exit code of backup-script
Alexander Barton [Tue, 18 Aug 2015 08:46:04 +0000 (10:46 +0200)]
backup-script-wrapper: Use bash
backup-script itself already uses /bin/bash, so we don't loose portability.
And now we can use nice bash features in the future ;-)
Alexander Barton [Tue, 18 Aug 2015 08:41:37 +0000 (10:41 +0200)]
Disable compression for the local system
Alexander Barton [Tue, 18 Aug 2015 08:35:59 +0000 (10:35 +0200)]
Use /usr/local/etc/backup-script.conf by default (not /etc/...)
Alexander Barton [Tue, 18 Aug 2015 08:32:49 +0000 (10:32 +0200)]
Use /var/backups as default backup target
Alexander Barton [Tue, 18 Aug 2015 08:32:23 +0000 (10:32 +0200)]
Test for conf_d in /usr/local/etc/backup-script.d, too
Alexander Barton [Tue, 18 Aug 2015 08:31:55 +0000 (10:31 +0200)]
Display location of configuration when usage is shown
Alexander Barton [Tue, 18 Aug 2015 08:31:02 +0000 (10:31 +0200)]
Look for configuration file in /usr/local/etc/, too
Alexander Barton [Tue, 18 Aug 2015 08:17:00 +0000 (10:17 +0200)]
backup-script-wrapper: Append log messages to an logfile
Alexander Barton [Tue, 18 Aug 2015 07:58:13 +0000 (09:58 +0200)]
backup-script-wrapper: Use "exec" to redirect output
Alexander Barton [Tue, 18 Aug 2015 07:49:35 +0000 (09:49 +0200)]
backup-script-wrapper: Better detect default mail recipient
Use "logcheck" if an user exists by this name, or if an alias is defined
in /etc/aliases. Use "root" otherwise.
Alexander Barton [Tue, 18 Aug 2015 07:41:58 +0000 (09:41 +0200)]
backup-script-wrapper: Correctly quote external command call
Alexander Barton [Tue, 18 Aug 2015 07:41:31 +0000 (09:41 +0200)]
backup-script-wrapper: Update copyright notice for 2015 :-)
Alexander Barton [Tue, 11 Aug 2015 12:59:14 +0000 (14:59 +0200)]
Make sure that "target" does NOT end with a slash ("/")
Alexander Barton [Tue, 11 Aug 2015 12:59:02 +0000 (14:59 +0200)]
Make sure that "source" does end with a slash ("/")
Alexander Barton [Tue, 4 Aug 2015 12:10:30 +0000 (14:10 +0200)]
ZFS: Use correct date for snapshot names
Don't use the current time, but the time of the (last) backup.
Alexander Barton [Tue, 4 Aug 2015 09:37:58 +0000 (11:37 +0200)]
Fix "new snapshot" log messages in "trial run" mode
Alexander Barton [Mon, 3 Aug 2015 14:25:40 +0000 (16:25 +0200)]
Move Makefile.ax into new lib/ directory
Alexander Barton [Mon, 3 Aug 2015 14:23:56 +0000 (16:23 +0200)]
Create individual Makefile's for all subdirectories
Alexander Barton [Wed, 29 Jul 2015 20:28:16 +0000 (22:28 +0200)]
etc/backup-script.conf: add "default_target"
Alexander Barton [Wed, 29 Jul 2015 19:37:13 +0000 (21:37 +0200)]
Update README.md, including spelling fixes
Alexander Barton [Wed, 29 Jul 2015 10:57:20 +0000 (12:57 +0200)]
Delay script exit for 3 seconds on abort
This allows things (like the rsync server process) to settle a
little bit ...
Alexander Barton [Wed, 29 Jul 2015 10:56:16 +0000 (12:56 +0200)]
backup-status: Fix handling of "current" snapshot on ZFS
Alexander Barton [Wed, 29 Jul 2015 10:38:29 +0000 (12:38 +0200)]
backup-status: Correctly get size of directories pointed to by symlinks
Alexander Barton [Wed, 29 Jul 2015 10:31:58 +0000 (12:31 +0200)]
Add support for generations on ZFS