]> arthur.barton.de Git - backup-script.git/log
backup-script.git
7 years agobackup-audit: Exclude /proc, /sys, and /net
Alexander Barton [Fri, 22 Jul 2016 13:03:40 +0000 (15:03 +0200)]
backup-audit: Exclude /proc, /sys, and /net

7 years agobackup-audit: Check for changes in some directory contents
Alexander Barton [Wed, 20 Jul 2016 08:24:31 +0000 (10:24 +0200)]
backup-audit: Check for changes in some directory contents

7 years agobackup-audit: Update list of files to check
Alexander Barton [Wed, 20 Jul 2016 08:21:54 +0000 (10:21 +0200)]
backup-audit: Update list of files to check

7 years agobackup-audit: Don't append ”/" when checking directories manually
Alexander Barton [Wed, 20 Jul 2016 07:53:36 +0000 (09:53 +0200)]
backup-audit: Don't append ”/" when checking directories manually

7 years agobackup-audit: Add more files to the checklist
Alexander Barton [Mon, 18 Jul 2016 16:33:48 +0000 (18:33 +0200)]
backup-audit: Add more files to the checklist

7 years agoCatch SIGTERM as well as SIGINT
Alexander Barton [Wed, 13 Jul 2016 13:29:51 +0000 (15:29 +0200)]
Catch SIGTERM as well as SIGINT

7 years agoFix and mark several notices & warnings of shellcheck(1)
Alexander Barton [Tue, 12 Jul 2016 10:23:19 +0000 (12:23 +0200)]
Fix and mark several notices & warnings of shellcheck(1)

7 years agobackup-audit: Suppress error message when no older generation exists
Alexander Barton [Fri, 8 Jul 2016 08:03:05 +0000 (10:03 +0200)]
backup-audit: Suppress error message when no older generation exists

7 years agoDon't clean up when "setup_exec" command failed
Alexander Barton [Wed, 6 Jul 2016 14:33:20 +0000 (16:33 +0200)]
Don't clean up when "setup_exec" command failed

7 years agobackup-script-wrapper: Don't check lockfile on its own
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.

7 years agoImplement global "setup_exec" configuration option
Alexander Barton [Wed, 6 Jul 2016 14:17:58 +0000 (16:17 +0200)]
Implement global "setup_exec" configuration option

7 years agoAdd "backup-audit" script
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!

7 years agoSlightly enhance "make check" ...
Alexander Barton [Mon, 4 Jul 2016 14:14:39 +0000 (16:14 +0200)]
Slightly enhance "make check" ...

7 years agoREADME.md: Slightly enhance backup-script-wrapper usage information
Alexander Barton [Mon, 4 Jul 2016 14:10:48 +0000 (16:10 +0200)]
README.md: Slightly enhance backup-script-wrapper usage information

7 years agoImplement new "backup_type": "disabled"
Alexander Barton [Wed, 1 Jun 2016 09:24:04 +0000 (11:24 +0200)]
Implement new "backup_type": "disabled"

7 years agoImplement very trivial first "make check" tests
Alexander Barton [Wed, 25 May 2016 08:25:57 +0000 (10:25 +0200)]
Implement very trivial first "make check" tests

7 years agoNew configuration variable "[default_]io_timeout"
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).

7 years agoSet rsync I/O timeout to 15 minutes
Alexander Barton [Fri, 20 May 2016 12:30:25 +0000 (14:30 +0200)]
Set rsync I/O timeout to 15 minutes

7 years agoUser rsync option "--delete-during"
Alexander Barton [Fri, 20 May 2016 12:16:27 +0000 (14:16 +0200)]
User rsync option "--delete-during"

7 years agobackup-script-wrapper: Show command line
Alexander Barton [Wed, 4 May 2016 11:58:15 +0000 (13:58 +0200)]
backup-script-wrapper: Show command line

8 years agoFix code that makes sure "source_root" ends with a slash
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 ...

8 years agoCorrectly initialize system array when specific systems are given
Alexander Barton [Thu, 28 Apr 2016 09:07:33 +0000 (11:07 +0200)]
Correctly initialize system array when specific systems are given

8 years agoFix some warning messages of shellcheck(1)
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>.

8 years agoImplement job tagging
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".

8 years agoREADME.md: It is [default_]files (not "file"), plural!
Alexander Barton [Wed, 17 Feb 2016 16:13:13 +0000 (17:13 +0100)]
README.md: It is [default_]files (not "file"), plural!

8 years agoUpdate copyright notices for 2016
Alexander Barton [Tue, 5 Jan 2016 08:52:13 +0000 (09:52 +0100)]
Update copyright notices for 2016

8 years agoDisable "globbing" for exclude patterns
Alexander Barton [Thu, 4 Feb 2016 13:09:24 +0000 (14:09 +0100)]
Disable "globbing" for exclude patterns

8 years agoShow generation config in "nothing to cleanup" message
Alexander Barton [Tue, 29 Dec 2015 09:11:05 +0000 (10:11 +0100)]
Show generation config in "nothing to cleanup" message

8 years agoFix backup-status not showing result code for successful backups
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!

8 years agobackup-status: Show more information from stamp file
Alexander Barton [Tue, 24 Nov 2015 13:18:13 +0000 (14:18 +0100)]
backup-status: Show more information from stamp file

8 years agoWrite more information to "stamp file"
Alexander Barton [Tue, 24 Nov 2015 13:17:52 +0000 (14:17 +0100)]
Write more information to "stamp file"

8 years agoUpdate trial run message, don't call it "synchronization command"
Alexander Barton [Tue, 24 Nov 2015 12:21:53 +0000 (13:21 +0100)]
Update trial run message, don't call it "synchronization command"

8 years agobackup-status: Enhance status message
Alexander Barton [Tue, 24 Nov 2015 12:03:58 +0000 (13:03 +0100)]
backup-status: Enhance status message

8 years agoImplement "scp" backup type
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.

8 years agoFirst step to support multiple "backup types"
Alexander Barton [Wed, 18 Nov 2015 15:27:34 +0000 (16:27 +0100)]
First step to support multiple "backup types"

8 years agoFix more warnings of shellcheck(1), use "[[ ... ]]" instead of "[ ... ]"
Alexander Barton [Wed, 18 Nov 2015 15:26:09 +0000 (16:26 +0100)]
Fix more warnings of shellcheck(1), use "[[ ... ]]" instead of "[ ... ]"

8 years agoFix two warnings of shellcheck(1)
Alexander Barton [Wed, 18 Nov 2015 15:24:45 +0000 (16:24 +0100)]
Fix two warnings of shellcheck(1)

8 years agobackup-status: Implement "--errors" to only list backups with errors
Alexander Barton [Mon, 5 Oct 2015 08:41:42 +0000 (10:41 +0200)]
backup-status: Implement "--errors" to only list backups with errors

8 years agobackup-status: Reformat usage information
Alexander Barton [Mon, 5 Oct 2015 08:40:58 +0000 (10:40 +0200)]
backup-status: Reformat usage information

8 years agoUpdate usage information, add [-|--latest]
Alexander Barton [Mon, 5 Oct 2015 08:19:40 +0000 (10:19 +0200)]
Update usage information, add [-|--latest]

8 years agoUse relative symlinks for ZFS snapshots
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.

8 years agorsync: Use better progress output when available (protocol version >=31)
Alexander Barton [Thu, 1 Oct 2015 12:37:40 +0000 (14:37 +0200)]
rsync: Use better progress output when available (protocol version >=31)

8 years agoDetect rsync and its protocol version
Alexander Barton [Thu, 1 Oct 2015 12:27:39 +0000 (14:27 +0200)]
Detect rsync and its protocol version

8 years agoDefault system excludes: Only exclude content, not directory itself
Alexander Barton [Mon, 21 Sep 2015 12:09:04 +0000 (14:09 +0200)]
Default system excludes: Only exclude content, not directory itself

8 years agoRefactor list of default excludes for system backups
Alexander Barton [Mon, 21 Sep 2015 11:57:35 +0000 (13:57 +0200)]
Refactor list of default excludes for system backups

8 years agoAdd "[default_]exclude_dirs_add" options
Alexander Barton [Mon, 21 Sep 2015 11:48:50 +0000 (13:48 +0200)]
Add "[default_]exclude_dirs_add" options

8 years agobackup-status: Backup directory uses configuration file name
Alexander Barton [Mon, 21 Sep 2015 10:27:12 +0000 (12:27 +0200)]
backup-status: Backup directory uses configuration file name

8 years agobackup-status: Don't read ${conf_d}/backup-script.conf twice
Alexander Barton [Mon, 21 Sep 2015 10:26:40 +0000 (12:26 +0200)]
backup-status: Don't read ${conf_d}/backup-script.conf twice

8 years agobackup-status: Use /var/backups as default backup target
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!

8 years agoFilesystem summary: Use "zfs list" on ZFS filesystems
Alexander Barton [Mon, 24 Aug 2015 08:24:41 +0000 (10:24 +0200)]
Filesystem summary: Use "zfs list" on ZFS filesystems

8 years agoRead in configuration before showing usage information
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.

8 years agobackup-script-wrapper: Check for PID file ("lock file")
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.

8 years agobackup-script-wrapper: Sort variables alphabetically
Alexander Barton [Wed, 19 Aug 2015 08:18:18 +0000 (10:18 +0200)]
backup-script-wrapper: Sort variables alphabetically

8 years agobackup-status: Implement new "--latest" option
Alexander Barton [Wed, 19 Aug 2015 08:13:29 +0000 (10:13 +0200)]
backup-status: Implement new "--latest" option

8 years agobackup-status: Refactor argument parsing
Alexander Barton [Wed, 19 Aug 2015 08:06:33 +0000 (10:06 +0200)]
backup-status: Refactor argument parsing

8 years agobackup-status: Correctly show "current" snapshot as newest
Alexander Barton [Wed, 19 Aug 2015 07:59:25 +0000 (09:59 +0200)]
backup-status: Correctly show "current" snapshot as newest

8 years agobackup-status: Use "poster -ap" when "--running" finds a running job
Alexander Barton [Tue, 18 Aug 2015 14:27:23 +0000 (16:27 +0200)]
backup-status: Use "poster -ap" when "--running" finds a running job

8 years agobackup-status: Implement "--running" option
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).

8 years agobackup-status: Remove unused variables
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?

8 years agobackup-status: Correctly quote and initialize variables
Alexander Barton [Tue, 18 Aug 2015 14:01:48 +0000 (16:01 +0200)]
backup-status: Correctly quote and initialize variables

8 years agobackup-status: Use exit code 2 when displaying usage information
Alexander Barton [Tue, 18 Aug 2015 10:24:16 +0000 (12:24 +0200)]
backup-status: Use exit code 2 when displaying usage information

8 years agobackup-status: Use same configuration search order than backup-script
Alexander Barton [Tue, 18 Aug 2015 10:23:50 +0000 (12:23 +0200)]
backup-status: Use same configuration search order than backup-script

8 years agobackup-script-wrapper: Show non-zero exit code in mail subject
Alexander Barton [Tue, 18 Aug 2015 09:22:05 +0000 (11:22 +0200)]
backup-script-wrapper: Show non-zero exit code in mail subject

8 years agobackup-script-wrapper: Use FQDN for mail subject
Alexander Barton [Tue, 18 Aug 2015 09:21:16 +0000 (11:21 +0200)]
backup-script-wrapper: Use FQDN for mail subject

8 years agobackup-script-wrapper: Write a "delimiter line" to the log file
Alexander Barton [Tue, 18 Aug 2015 09:14:25 +0000 (11:14 +0200)]
backup-script-wrapper: Write a "delimiter line" to the log file

8 years agoREADME.md: Update "configuration" section
Alexander Barton [Tue, 18 Aug 2015 09:09:00 +0000 (11:09 +0200)]
README.md: Update "configuration" section

8 years agoExit with code 7 when not all jobs have been run
Alexander Barton [Tue, 18 Aug 2015 09:08:38 +0000 (11:08 +0200)]
Exit with code 7 when not all jobs have been run

8 years agoStreamline and document exit codes
Alexander Barton [Tue, 18 Aug 2015 09:08:03 +0000 (11:08 +0200)]
Streamline and document exit codes

8 years agoReturn exit code 1 on errors!
Alexander Barton [Tue, 18 Aug 2015 08:48:03 +0000 (10:48 +0200)]
Return exit code 1 on errors!

8 years agobackup-script-wrapper: Return exit code of backup-script
Alexander Barton [Tue, 18 Aug 2015 08:46:21 +0000 (10:46 +0200)]
backup-script-wrapper: Return exit code of backup-script

8 years agobackup-script-wrapper: Use bash
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 ;-)

8 years agoDisable compression for the local system
Alexander Barton [Tue, 18 Aug 2015 08:41:37 +0000 (10:41 +0200)]
Disable compression for the local system

8 years agoUse /usr/local/etc/backup-script.conf by default (not /etc/...)
Alexander Barton [Tue, 18 Aug 2015 08:35:59 +0000 (10:35 +0200)]
Use /usr/local/etc/backup-script.conf by default (not /etc/...)

8 years agoUse /var/backups as default backup target
Alexander Barton [Tue, 18 Aug 2015 08:32:49 +0000 (10:32 +0200)]
Use /var/backups as default backup target

8 years agoTest for conf_d in /usr/local/etc/backup-script.d, too
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

8 years agoDisplay location of configuration when usage is shown
Alexander Barton [Tue, 18 Aug 2015 08:31:55 +0000 (10:31 +0200)]
Display location of configuration when usage is shown

8 years agoLook for configuration file in /usr/local/etc/, too
Alexander Barton [Tue, 18 Aug 2015 08:31:02 +0000 (10:31 +0200)]
Look for configuration file in /usr/local/etc/, too

8 years agobackup-script-wrapper: Append log messages to an logfile
Alexander Barton [Tue, 18 Aug 2015 08:17:00 +0000 (10:17 +0200)]
backup-script-wrapper: Append log messages to an logfile

8 years agobackup-script-wrapper: Use "exec" to redirect output
Alexander Barton [Tue, 18 Aug 2015 07:58:13 +0000 (09:58 +0200)]
backup-script-wrapper: Use "exec" to redirect output

8 years agobackup-script-wrapper: Better detect default mail recipient
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.

8 years agobackup-script-wrapper: Correctly quote external command call
Alexander Barton [Tue, 18 Aug 2015 07:41:58 +0000 (09:41 +0200)]
backup-script-wrapper: Correctly quote external command call

8 years agobackup-script-wrapper: Update copyright notice for 2015 :-)
Alexander Barton [Tue, 18 Aug 2015 07:41:31 +0000 (09:41 +0200)]
backup-script-wrapper: Update copyright notice for 2015 :-)

8 years agoMake sure that "target" does NOT end with a slash ("/")
Alexander Barton [Tue, 11 Aug 2015 12:59:14 +0000 (14:59 +0200)]
Make sure that "target" does NOT end with a slash ("/")

8 years agoMake sure that "source" does 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 ("/")

8 years agoZFS: Use correct date for snapshot names
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.

8 years agoFix "new snapshot" log messages in "trial run" mode
Alexander Barton [Tue, 4 Aug 2015 09:37:58 +0000 (11:37 +0200)]
Fix "new snapshot" log messages in "trial run" mode

8 years agoMove Makefile.ax into new lib/ directory
Alexander Barton [Mon, 3 Aug 2015 14:25:40 +0000 (16:25 +0200)]
Move Makefile.ax into new lib/ directory

8 years agoCreate individual Makefile's for all subdirectories
Alexander Barton [Mon, 3 Aug 2015 14:23:56 +0000 (16:23 +0200)]
Create individual Makefile's for all subdirectories

8 years agoetc/backup-script.conf: add "default_target"
Alexander Barton [Wed, 29 Jul 2015 20:28:16 +0000 (22:28 +0200)]
etc/backup-script.conf: add "default_target"

8 years agoUpdate README.md, including spelling fixes
Alexander Barton [Wed, 29 Jul 2015 19:37:13 +0000 (21:37 +0200)]
Update README.md, including spelling fixes

8 years agoDelay script exit for 3 seconds on abort
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 ...

8 years agobackup-status: Fix handling of "current" snapshot on ZFS
Alexander Barton [Wed, 29 Jul 2015 10:56:16 +0000 (12:56 +0200)]
backup-status: Fix handling of "current" snapshot on ZFS

8 years agobackup-status: Correctly get size of directories pointed to by symlinks
Alexander Barton [Wed, 29 Jul 2015 10:38:29 +0000 (12:38 +0200)]
backup-status: Correctly get size of directories pointed to by symlinks

8 years agoAdd support for generations on ZFS
Alexander Barton [Wed, 29 Jul 2015 10:31:58 +0000 (12:31 +0200)]
Add support for generations on ZFS

8 years agoFix filesystem detection in DeleteSubvolume()
Alexander Barton [Wed, 29 Jul 2015 10:15:54 +0000 (12:15 +0200)]
Fix filesystem detection in DeleteSubvolume()

8 years agoCreate the system directory as subvolume when using generations
Alexander Barton [Wed, 29 Jul 2015 08:41:37 +0000 (10:41 +0200)]
Create the system directory as subvolume when using generations

This is required for ZFS in the future and shouldn't be a problem on btrfs.

8 years agoIntroduce Initialize_Last_SysTarget_Snapshot() function
Alexander Barton [Wed, 29 Jul 2015 08:39:24 +0000 (10:39 +0200)]
Introduce Initialize_Last_SysTarget_Snapshot() function

This is in preparation for ZFS support.

8 years agoAdd compatibility layer for backup-pull(1) config files
Alexander Barton [Wed, 29 Jul 2015 08:35:30 +0000 (10:35 +0200)]
Add compatibility layer for backup-pull(1) config files

The following (now deprecated!) configurations variables used by the
backup-pull(1) script in job definition files are automatically mapped to
the new backup-script variables:

- host -> system
- source -> source_root
- pre_exec -> job_pre_exec
- post_exec -> job_post_exec

8 years agoREADME: Add description for "[default_]source_root"
Alexander Barton [Wed, 29 Jul 2015 08:34:07 +0000 (10:34 +0200)]
README: Add description for "[default_]source_root"

8 years agoCloneSubvolume: Introduce $snapshot parameter
Alexander Barton [Wed, 29 Jul 2015 08:31:05 +0000 (10:31 +0200)]
CloneSubvolume: Introduce $snapshot parameter

This is in preparation for ZFS support.