Alan J. Pippin [Fri, 1 Dec 2023 17:24:34 +0000 (10:24 -0700)]
Fix mountpoint after full fs transfer if needed
Change-Id: Idd9f9ac83e4191e00c883469e6d3a9242e0a6e38
Alan J. Pippin [Sun, 21 May 2023 15:41:38 +0000 (09:41 -0600)]
Changed from looking directly in .zfs for snaps.
Use zfs command to avoid automounting of .zfs.
Change-Id: Iab631a071fb8a335244d42b5e7b801f76b0ce2b0
Alan J. Pippin [Thu, 18 May 2023 20:20:06 +0000 (14:20 -0600)]
Changed deprecated calls to tempfile to mktemp instead
Change-Id: I973827ec916f65c5f8e7f2317c5b51a30ea88474
Alan J. Pippin [Sun, 8 Jan 2023 18:43:24 +0000 (11:43 -0700)]
Tweaked dd commands for label clear operation
Change-Id: I2ccffbf5b5cfaabe60a68af76f5a271e342c16c1
Alan J. Pippin [Sun, 8 Jan 2023 17:19:58 +0000 (10:19 -0700)]
Added new script to help clear ZFS labels from a disk
Change-Id: I0eea1cafb1f8ab4405809ee7156ce120a1927ae6
Alan J. Pippin [Sat, 31 Dec 2022 16:54:51 +0000 (09:54 -0700)]
Added new zfs lock checking script
Change-Id: I4b914aca266e90f691fa7eda58b394b6bc925881
Alan J. Pippin [Sat, 31 Dec 2022 16:54:27 +0000 (09:54 -0700)]
Add -f to zpool import commands
Change-Id: I37bd5b1989b546e32f81fe0a559372134d158700
Alan J. Pippin [Tue, 27 Dec 2022 19:41:29 +0000 (12:41 -0700)]
Ignore less and tail when checking if we are already running
Change-Id: I09eb76609f3cbd2529b0561cd8611adc3ab9b5fa
Alan J. Pippin [Thu, 23 Sep 2021 16:17:33 +0000 (10:17 -0600)]
Added more context information in error messages
Change-Id: Ia45e18f609654d40aa1ac4b4dc2cf17304d4c78b
Alan J. Pippin [Wed, 22 Sep 2021 23:31:24 +0000 (17:31 -0600)]
Use expect_empty_remote_list flag when checking if remote list should be empty or not
Change-Id: I3d7820c19f4549163d946668f2c3c99a3d5f79fe
Alan J. Pippin [Fri, 20 Aug 2021 22:03:56 +0000 (16:03 -0600)]
Need to be root to destroy snapshots
Change-Id: I59d7cc59785b99219af3bdf1163461e738ee1d9c
Alan J. Pippin [Sun, 20 Jun 2021 15:37:28 +0000 (09:37 -0600)]
Fixed case when local filesystem is missing
Change-Id: Ifcf8773d148b058825519b4676a4a456e95e933f
Alan J. Pippin [Mon, 1 Feb 2021 01:44:04 +0000 (18:44 -0700)]
Added new option to expect empty remote lists when backing up to a new disk
Change-Id: I77f3f0323f876adbb3e46640dc3acee9e3b43146
Alan J. Pippin [Fri, 2 Oct 2020 18:47:50 +0000 (12:47 -0600)]
Don't report still in progress zfs scrubs as errors
Change-Id: I7476a6f0f2f010b5a24bbcdfd07e19418eb6688b
Alan J. Pippin [Mon, 24 Aug 2020 00:21:42 +0000 (18:21 -0600)]
Return non-zero exit code if any command in pipe fails
Change-Id: I463e7afc7ee01a352558194eabbac67c9446b106
Alan J. Pippin [Sun, 5 Apr 2020 16:36:50 +0000 (10:36 -0600)]
Add feature to try rollback twice if it fails
Change-Id: I7b502fbfecaa3269e1dea64b110e95a84ce9b1b7
Alan J. Pippin [Sat, 29 Feb 2020 18:13:35 +0000 (11:13 -0700)]
Collect messages from zpool export cmds and email those if it fails to export
Change-Id: I7bb12c4fbab23b2c5bf6b63c76a0fb4abf97da33
Alan J. Pippin [Tue, 18 Feb 2020 15:00:47 +0000 (08:00 -0700)]
Added logging of messages when trying to import backup pool
Change-Id: I44bec9aa3593e5b80d05d22d2d76323cadef3bee
Alan J. Pippin [Mon, 17 Feb 2020 04:35:48 +0000 (21:35 -0700)]
Made detecting if zpool is already mounted or unmounted better
Change-Id: I39bf8bb70f57ff6d1c7c260207beaadbd855b10d
Alan J. Pippin [Mon, 3 Feb 2020 21:05:51 +0000 (14:05 -0700)]
Updated comment to describe actual behavior
Change-Id: Id8138151c76c3211809cb2ff27960dfca0a247e2
Alan J. Pippin [Mon, 3 Feb 2020 21:01:29 +0000 (14:01 -0700)]
Fixed bug that caused empty error messages to be emailed back
Change-Id: I28685c64435343bc48c938cb422ad06373de01f6
Alan J. Pippin [Mon, 3 Feb 2020 20:32:38 +0000 (13:32 -0700)]
Added support to replicate and restore from multiple backup pools
Change-Id: Ia3d0207cc0b5f551b5a464b73411c310c4fe3e0a
Alan J. Pippin [Sat, 16 Feb 2019 02:18:48 +0000 (19:18 -0700)]
Updated replicate size to work with K M or G
Change-Id: I4e83ae8665f24561bd34c1b8085277826c402e3e
Alan J. Pippin [Thu, 14 Feb 2019 08:29:24 +0000 (01:29 -0700)]
Fixed syntax error in latest fix
Change-Id: I0fd708aca9563982c3106ba7838364df5ffd8b4c
Alan J. Pippin [Thu, 14 Feb 2019 05:51:45 +0000 (22:51 -0700)]
Added --compressed flag to zfs send cmds
Change-Id: I010c927fa250f739ccd6c62c0882be2066fd9562
Alan J. Pippin [Thu, 14 Feb 2019 05:50:23 +0000 (22:50 -0700)]
Tweaked replicate script to show open file handles when it can't export backup pool
Change-Id: I729b1436a7aa250b639caf3a1fb4a72de492bb6a
Alan J. Pippin [Mon, 11 Feb 2019 02:33:37 +0000 (19:33 -0700)]
Make logdir if it doesn't exist
Change-Id: Idbfba60f25c6930984a1d5c48ef0223d58cb3638
Alan J. Pippin [Wed, 12 Dec 2018 20:00:16 +0000 (13:00 -0700)]
Re-import pool before checking for scrub errors
Change-Id: Icce2734ea3b32e341e8579fc9e75dd8ecd216844
Alan J. Pippin [Sun, 3 Dec 2017 05:43:41 +0000 (22:43 -0700)]
Only export the pool after scrubbing it if it is still imported
Change-Id: I43210627fd78e3bfc62c8d6cf841b85c35673bf0
Alan J. Pippin [Sat, 4 Nov 2017 19:51:33 +0000 (13:51 -0600)]
Fixed bug in searching for zfs-scrub to avoid export after backup
Change-Id: Iab159bb8d4117cb277e83da37433a375fcb9c7a4
Alan J. Pippin [Tue, 16 Feb 2016 21:44:24 +0000 (14:44 -0700)]
Merge branch 'master' of ssh://gerrit.cobaldwins.net:29418/zfs/zfs-snapshot
Carl Baldwin [Tue, 16 Feb 2016 19:51:49 +0000 (12:51 -0700)]
Merge all the work Alan's done for the past 8 years
Conflicts:
zfs-replicate
Change-Id: I79a54bccf63ee4383045240c6b72b8bff6313f0d
Carl Baldwin [Tue, 16 Feb 2016 19:51:49 +0000 (12:51 -0700)]
Merge all the work Alan's done for the past 8 years
Conflicts:
zfs-replicate
Change-Id: I79a54bccf63ee4383045240c6b72b8bff6313f0d
Carl Baldwin [Tue, 16 Feb 2016 19:29:34 +0000 (12:29 -0700)]
Add the git review file
Change-Id: Ie386d097da519a442bf456c7891794c93e229173
Alan J. Pippin [Wed, 19 Mar 2014 16:47:25 +0000 (10:47 -0600)]
Consolidated zfs send and recv operations into replicate function
Fixed bug in fatal_and_exit removing previous backup marker,
when it should have just been removing the current backup markers.
Alan J. Pippin [Wed, 19 Mar 2014 02:28:15 +0000 (20:28 -0600)]
Fixed bug in running throttle command on remote machine instead of local
Alan J. Pippin [Thu, 13 Mar 2014 13:53:48 +0000 (07:53 -0600)]
Tweaked comment in last commit
Alan J. Pippin [Thu, 13 Mar 2014 13:48:58 +0000 (07:48 -0600)]
Added check to not export pools if zfs-replicate or zfs-scrub process is running
Alan J. Pippin [Mon, 10 Mar 2014 16:58:15 +0000 (10:58 -0600)]
Fixed typo in error message email
Alan J. Pippin [Fri, 7 Mar 2014 00:31:07 +0000 (17:31 -0700)]
Added hostname to error messages that are emailed
Alan J. Pippin [Thu, 6 Mar 2014 01:10:06 +0000 (18:10 -0700)]
Added fatal_and_exit routine so email will be sent on error
Alan J. Pippin [Thu, 17 Jan 2013 02:26:55 +0000 (19:26 -0700)]
Fixed bugs related to import/export backup pool feature.
Alan J. Pippin [Sat, 22 Dec 2012 17:38:04 +0000 (10:38 -0700)]
Changes to support mounting backup pool under linux zfs
Alan J. Pippin [Fri, 12 Oct 2012 03:26:25 +0000 (21:26 -0600)]
Major changes from nexenta versions to support running under unbuntu.
Added ability to replicate from local pool to local backup pool.
Added new option to all import/export of backup pool prior/after replication.
Alan J. Pippin [Thu, 11 Oct 2012 03:09:44 +0000 (21:09 -0600)]
Added gitignore to ignore local zfs-scripts.conf file
Alan J. Pippin [Sat, 9 Oct 2010 14:31:02 +0000 (08:31 -0600)]
Added an already running check
Alan J. Pippin [Fri, 29 Jan 2010 17:25:34 +0000 (10:25 -0700)]
Merge branch 'master' of ssh://backup.pippins.net/etc/bin/zfs/
Conflicts:
zfs-replicate
Alan J. Pippin [Fri, 29 Jan 2010 05:14:15 +0000 (22:14 -0700)]
Added throttle option support
Alan J. Pippin [Fri, 29 Jan 2010 04:49:47 +0000 (21:49 -0700)]
Fixed typo in logfile name
Alan J. Pippin [Fri, 29 Jan 2010 04:43:28 +0000 (21:43 -0700)]
Tweaked some settings in zfs-replicate.
Added BRAND NEW restore scripts to aid in restoring filesystems from backup pool to a destination pool.
Alan J. Pippin [Thu, 29 Jan 2009 14:39:50 +0000 (07:39 -0700)]
Added missing anchor to backup pool name filter
Alan J. Pippin [Thu, 29 Jan 2009 14:39:38 +0000 (07:39 -0700)]
Increased spin lock cycle time
Alan J. Pippin [Sun, 18 Jan 2009 20:33:02 +0000 (13:33 -0700)]
Fixed midnight bug in autosnap wrapper script
Alan J. Pippin [Sat, 17 Jan 2009 23:13:23 +0000 (16:13 -0700)]
Changed default throttle options
Alan J. Pippin [Sat, 17 Jan 2009 22:43:47 +0000 (15:43 -0700)]
Fixed misnamed throttle opt var
Alan J. Pippin [Sat, 17 Jan 2009 22:40:08 +0000 (15:40 -0700)]
Set default throttle enable to 0
Alan J. Pippin [Sat, 17 Jan 2009 22:39:51 +0000 (15:39 -0700)]
Added new throttle option
Alan J. Pippin [Sat, 17 Jan 2009 07:10:28 +0000 (00:10 -0700)]
Fixed typo
Alan J. Pippin [Sat, 17 Jan 2009 04:44:40 +0000 (21:44 -0700)]
Added code to destroy backup markers on local machine if replicate aborts
Alan J. Pippin [Sat, 17 Jan 2009 04:20:03 +0000 (21:20 -0700)]
Renamed zfs-replicate wrapper script
Alan J. Pippin [Sat, 17 Jan 2009 04:13:38 +0000 (21:13 -0700)]
Removed accidentally added local configuration file from repo
Alan J. Pippin [Sat, 17 Jan 2009 04:10:44 +0000 (21:10 -0700)]
Added configuration scripts to hold customized options
Alan J. Pippin [Fri, 16 Jan 2009 15:10:07 +0000 (08:10 -0700)]
Added replicate wrapper logfile.
Added concept of "no limit" maxruntime.
Alan J. Pippin [Fri, 16 Jan 2009 14:54:16 +0000 (07:54 -0700)]
Added fatal_and_exit routine to handle all early exits out of the script
Alan J. Pippin [Fri, 16 Jan 2009 07:07:05 +0000 (00:07 -0700)]
Removed old freebsd zfs scripts
Alan J. Pippin [Fri, 16 Jan 2009 06:57:18 +0000 (23:57 -0700)]
Created the zfs-replicate-wrapper script that factors in duration to
stop replicating once duration exceeds a certain amount. Updated
zfs-log-parser to parse the stats from the replicate jobs properly.
Alan J. Pippin [Fri, 16 Jan 2009 03:43:36 +0000 (20:43 -0700)]
Added new destroy on full option
Alan J. Pippin [Wed, 14 Jan 2009 07:17:39 +0000 (00:17 -0700)]
Added code to fallback to lists of snapshots to find common point
if the backup markers can't be found. Fixed various bugs.
Alan J. Pippin [Tue, 13 Jan 2009 07:56:18 +0000 (00:56 -0700)]
Initial working draft of the new replicate algorithm using
backup marker snapshots instead of pure snapshot diffs.
Alan J. Pippin [Tue, 13 Jan 2009 03:49:21 +0000 (20:49 -0700)]
Added code to deal with not finding a common snapshot
Alan J. Pippin [Mon, 12 Jan 2009 07:44:01 +0000 (00:44 -0700)]
Added logging to zfs-scrub
Changed zfs-replicate pool name to backups
Fixed snapname bug in zfs-autosnap
Alan J. Pippin [Mon, 12 Jan 2009 06:41:20 +0000 (23:41 -0700)]
Changed name of local backup pool
Alan J. Pippin [Mon, 12 Jan 2009 06:23:39 +0000 (23:23 -0700)]
Added variable for the name of the local backup pool name
Alan J. Pippin [Mon, 12 Jan 2009 06:19:35 +0000 (23:19 -0700)]
Moved old zfs-replicate scripts out of the way.
Copied Carl's new replicate script into place.
Alan J. Pippin [Mon, 12 Jan 2009 05:44:13 +0000 (22:44 -0700)]
Test commit
Alan J. Pippin [Mon, 12 Jan 2009 05:26:05 +0000 (22:26 -0700)]
Removed import command
Alan J. Pippin [Sun, 11 Jan 2009 00:29:54 +0000 (17:29 -0700)]
Changed location of log file
Alan J. Pippin [Sat, 10 Jan 2009 23:54:19 +0000 (16:54 -0700)]
Merged zfs-scrub scripts together
Alan J. Pippin [Sat, 10 Jan 2009 23:43:26 +0000 (16:43 -0700)]
Moved pool names to variable
Alan J. Pippin [Sat, 10 Jan 2009 23:41:47 +0000 (16:41 -0700)]
Updated paths
Alan J. Pippin [Sat, 10 Jan 2009 23:34:55 +0000 (16:34 -0700)]
Added new script to link the GIT scripts to another location
Picked up bug fixes from Carl for zfs-autosnap
Super-User [Sat, 10 Jan 2009 23:20:38 +0000 (16:20 -0700)]
Not needed for Nexenta
Alan J. Pippin [Thu, 25 Sep 2008 21:36:36 +0000 (15:36 -0600)]
Renamed all references from USB to EXT
Alan J. Pippin [Thu, 25 Sep 2008 15:26:00 +0000 (09:26 -0600)]
Fixed zfs-replicate bug when a filesystem is created on the backup drive,
and the snapshots for that filesystem are all deleted over time, and new
ones are attempted to be sent to the backup drive. In this case, the script
was trying to send incremental, but there were no snapshots left on the
zfs filesystem. Now, if a filesystem exists on the backup drive but it
has no snapshots, that filesystem is removed so a full stream will be sent
of the first snapshot that is synced to the backup drive.
Alan J. Pippin [Fri, 22 Aug 2008 13:34:29 +0000 (07:34 -0600)]
Changed cleanup() trap to be based on INT signal instead of EXIT
to prevent subsequent script instantiations from affecting the
any that are currently running if they can't obtain the lock
in a timely manner.
Alan J. Pippin [Fri, 22 Aug 2008 05:45:36 +0000 (23:45 -0600)]
Added safegaurds to prevent script from running on top of itself
Alan J. Pippin [Fri, 22 Aug 2008 03:23:53 +0000 (21:23 -0600)]
Added support for handling compressed files
Alan J. Pippin [Fri, 22 Aug 2008 03:16:47 +0000 (21:16 -0600)]
Updated log file location to dump to /var/log/zfs instead of /var/log
Alan J. Pippin [Sun, 20 Apr 2008 16:45:02 +0000 (10:45 -0600)]
Added usage information to the header
Alan J. Pippin [Sun, 20 Apr 2008 14:10:27 +0000 (08:10 -0600)]
Added new script modified from the FreeBSD release to avoid kernel panics.
Alan J. Pippin [Tue, 18 Mar 2008 02:03:10 +0000 (20:03 -0600)]
Fixed a race condition that could lead to 2 scrubs running simultaneously.
Added logging support.
Alan J. Pippin [Fri, 14 Mar 2008 19:34:06 +0000 (13:34 -0600)]
Added date filter capability when parsing snapshot total logs.
Alan J. Pippin [Wed, 12 Mar 2008 16:14:46 +0000 (10:14 -0600)]
Fixed bug when parsing filesystems that have no data on a given date.
Alan J. Pippin [Tue, 11 Mar 2008 02:25:23 +0000 (20:25 -0600)]
Fixed bug in parsing snapshot total logs
Alan J. Pippin [Tue, 11 Mar 2008 02:20:35 +0000 (20:20 -0600)]
Updated to contain daily snapshot code
Alan J. Pippin [Tue, 11 Mar 2008 02:16:09 +0000 (20:16 -0600)]
Added new script to scrub a USB backup drive
Alan J. Pippin [Sat, 8 Mar 2008 16:26:08 +0000 (09:26 -0700)]
Added code to poweron the destpool and import it.
Added code to export the destpool and power it down.
Alan J. Pippin [Sat, 8 Mar 2008 06:04:56 +0000 (23:04 -0700)]
I decided to change the name of the example script again.
Alan J. Pippin [Sat, 8 Mar 2008 05:47:24 +0000 (22:47 -0700)]
Added script that can be used to diff files between different snapshots.
Alan J. Pippin [Sat, 8 Mar 2008 05:46:50 +0000 (22:46 -0700)]
Made the all scripts examples, allowing local copies
to be created by the other users that aren't tracked by GIT.