]>
git.proxmox.com Git - pve-zsync.git/log
Thomas Lamprecht [Tue, 4 May 2021 12:23:35 +0000 (14:23 +0200)]
docs: use standard long-opt double --arg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 4 May 2021 10:13:34 +0000 (12:13 +0200)]
avoid odd post-if style for die
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 4 May 2021 10:13:18 +0000 (12:13 +0200)]
fix a variable declared in conditional statement
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:10:04 +0000 (10:10 +0200)]
fix #1669: add prepend-storage-id flag
so one can set up jobs for guests with disks with the same name on different
storages. For example,
storageA:vm-123-disk-0
storageB:vm-123-disk-0
will be synced to
target/storageA/vm-123-disk-0
target/storageB/vm-123-disk-0
when the flag is specified.
The necessary parent file systems (one per storage ID) are created as needed.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:10:03 +0000 (10:10 +0200)]
parse disks: also include storage ID information
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:10:02 +0000 (10:10 +0200)]
parse disks: don't include colon in storage name variable
in preparation to re-use it elsewhere.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:10:01 +0000 (10:10 +0200)]
add create_file_system function
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:10:00 +0000 (10:10 +0200)]
add check_dataset_exists function
as a generalization and replacement of check_pool_exists.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:09:59 +0000 (10:09 +0200)]
add target_dataset function
so the logic can be re-used and extended in a single place.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:09:58 +0000 (10:09 +0200)]
usage: fix type for maxsnap
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:09:57 +0000 (10:09 +0200)]
usage: describe flag parameters correctly
It's not possible to provide a false value. From the documentation for
GetOptionsFromArray:
The argument specification is optional. If omitted, the option is considered
boolean, a value of 1 will be assigned when the option is used on the
command line.
Make it clear that specifying the flag alone already enables it.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:09:56 +0000 (10:09 +0200)]
copyright: update year
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Tue, 4 May 2021 08:09:55 +0000 (10:09 +0200)]
whitespace fix
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 17 Dec 2020 14:17:39 +0000 (15:17 +0100)]
fix #2821: only abort if there really is a waiting/syncing job
by remembering the process via PID+start time+boot ID and checking for that
information in the new instance. If the old instance can't be found, the new
one will continue and register itself in the state.
After updating the pve-zsync package, if there is a waiting instance running the
old version, one more might be created, because there is no instance_id yet. But
the new instance will set the instance_id, which any later instance will see.
More importantly, if the state is wrongly 'waiting' or 'syncing', i.e.
because an instance was terminated before finishing, we don't abort anymore and
recover from the wrong state, thus fixing the bug.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 17 Dec 2020 14:17:38 +0000 (15:17 +0100)]
introduce and use read_file helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 17 Dec 2020 14:17:37 +0000 (15:17 +0100)]
remove unused function write_cron
Commit
76b2c677f7a2fd81a990533b317374d168d1d918 replaced it with
update_cron.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Dietmar Maurer [Thu, 26 Nov 2020 04:57:22 +0000 (05:57 +0100)]
bump version to 2.0-4
Bruce Wainer [Tue, 16 Jun 2020 18:53:35 +0000 (14:53 -0400)]
pve-zsync: Flip Source and Dest in functions to so jobs can share Dest
Signed-off-by: Bruce Wainer <brwainer@gmail.com>
Tested-by: Wolfgang Link <w.link@proxmox.com>
Reviewed-by: Wolfgang Link <w.link@proxmox.com>
Thomas Lamprecht [Mon, 23 Mar 2020 17:37:30 +0000 (18:37 +0100)]
bump version to 2.0-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Wolfgang Link [Wed, 18 Mar 2020 06:51:12 +0000 (07:51 +0100)]
check for correct incremental sync snapshot on destination
For an incremental sync you need the last_snap on both sides. The
call to the zfs list contains the snapshot. If the snapshot does not
exist, the command is returned with an error that we are catching.
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
Reviewed-By: Fabian Ebner <f.ebner@proxmox.com>
Tested-By: Fabian Ebner <f.ebner@proxmox.com>
Thomas Lamprecht [Thu, 19 Mar 2020 12:02:02 +0000 (13:02 +0100)]
Revert "fix: check for incremental sync snapshot."
This reverts commit
723623e8850f0f78cfce6d0c123c68b621184a71 .
Wolfgang Link [Wed, 18 Mar 2020 06:51:12 +0000 (07:51 +0100)]
fix: check for incremental sync snapshot.
For an incremental sync you need the last_snap on both sides.
Thomas Lamprecht [Mon, 27 Jan 2020 17:48:10 +0000 (18:48 +0100)]
bump version to 2.0-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Mon, 27 Jan 2020 09:47:38 +0000 (10:47 +0100)]
Add efidisk as a valid disk key
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Mon, 27 Jan 2020 09:47:37 +0000 (10:47 +0100)]
Factor out the regular expression for disk keys as a variable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Thomas Lamprecht [Fri, 11 Oct 2019 10:08:14 +0000 (12:08 +0200)]
refactor cleanup code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Thu, 10 Oct 2019 09:55:17 +0000 (11:55 +0200)]
Check whether job has been disabled while waiting/syncing
There are two new checks that allow disabling a job while
it is 'syncing' or 'waiting'. Previously when sync finished
it would re-enable such a job involuntarily.
Disabling a 'waiting' job causes it to not sync anymore.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 10 Oct 2019 09:55:16 +0000 (11:55 +0200)]
Detect other running instances of the same job
A 'waiting' state is introduced and other 'waiting' and 'syncing'
instances of the same job are now detected by moving the check out
from the sync lock.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 10 Oct 2019 09:55:15 +0000 (11:55 +0200)]
Improve read-modify-write enclosures
Previously inside sync we just called update_job directly, now
we make sure to read the latest verison of the job first.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Fabian Ebner [Thu, 10 Oct 2019 09:55:14 +0000 (11:55 +0200)]
Refactor locking
This introduces a new locked() mechanism allowing to enclose locked
sections in a cleaner way. There's only two types of locks namely one
for state and cron (they are always read together and almost always
written together) and one for sync.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Thomas Lamprecht [Thu, 23 May 2019 16:18:32 +0000 (18:18 +0200)]
buildsys: switch upload dist over to buster
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 23 May 2019 15:46:52 +0000 (17:46 +0200)]
bump version to 2.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 23 May 2019 15:42:54 +0000 (17:42 +0200)]
buildsys: use dpkg-dev makefile helpers for pkg info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 4 Apr 2019 14:30:34 +0000 (16:30 +0200)]
bump version to 1.7-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Mira Limbeck [Wed, 3 Apr 2019 12:23:04 +0000 (14:23 +0200)]
close #1933: add -dest-config-path option
this allows the config dir to be set on the destination target. this can
be useful if the default path in $CONFIG_PATH (/var/lib/pve-zsync) is not
persistent. the option is optional and falls back to $CONFIG_PATH if not
specified.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Thomas Lamprecht [Mon, 1 Apr 2019 14:27:22 +0000 (16:27 +0200)]
send_config: small code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sun, 31 Mar 2019 13:52:20 +0000 (15:52 +0200)]
buildsys: add dsc target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 7 Mar 2019 10:33:42 +0000 (11:33 +0100)]
bump version to 1.7-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 7 Mar 2019 10:32:07 +0000 (11:32 +0100)]
allow to set DEBUG over environment and load Data::Dumper conditionally
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 7 Mar 2019 08:46:57 +0000 (09:46 +0100)]
improve signal handler, print error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 7 Mar 2019 08:45:27 +0000 (09:45 +0100)]
replace File::Copy::move with built-in rename
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 7 Mar 2019 08:43:36 +0000 (09:43 +0100)]
followup: pass properties without value
our GetOPts definition of it does not defines a value, so use it as
boolean flag like 'verbose' and either pass ther param or not.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Wolfgang Link [Wed, 6 Mar 2019 14:43:42 +0000 (15:43 +0100)]
Fix #1381: add flag allowing one to send zfs properties
Add properties flag for including the properties in the send stream.
With the flag, we do not break the current behavior and give the user
who like to sync their properties the possibility to do so.
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 22 Nov 2018 14:10:43 +0000 (15:10 +0100)]
bump version to 1.7-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 19 Nov 2018 16:56:33 +0000 (17:56 +0100)]
vm_exists: directly check if we look for local guest
no need to make a call to ls if we just can check directly..
also remove a (possible problematic)
> my $foo = 'bar' if $boolean;
construct
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 19 Nov 2018 16:56:32 +0000 (17:56 +0100)]
fix #1587: sync: check if job state is defined
just because the $job hash is populated it's state key doesn't needs
to be..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 17 Nov 2018 14:35:24 +0000 (15:35 +0100)]
fix another case where source-user was used to connect to dest
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 17 Nov 2018 14:26:11 +0000 (15:26 +0100)]
fix a case where source-user was used to connect to dest
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
David [Thu, 13 Sep 2018 09:04:54 +0000 (11:04 +0200)]
fix #1907: cron entry duplicated on disable/enable
match the interval in front of the first root
Signed-off-by: David <d.limbeck@proxmox.com>
Thomas Lamprecht [Fri, 24 Aug 2018 09:45:09 +0000 (11:45 +0200)]
bump version to 1.7-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 24 Aug 2018 09:40:46 +0000 (11:40 +0200)]
cleanup ugly hash usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
David Limbeck [Tue, 21 Aug 2018 09:40:17 +0000 (11:40 +0200)]
fix #1860 added ability to specify source and destination user
source user and destination user can be specified with -source-user and
-dest-user, root is chosen if none is specified, -source-user is invalid
for VMs as source
requires zfs permissions on source and destination target
destination dataset has to be created already but not mounted
Thomas Lamprecht [Wed, 6 Jun 2018 06:38:09 +0000 (08:38 +0200)]
actually print request command help
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 6 Jun 2018 06:20:47 +0000 (08:20 +0200)]
buildsys: convert to dpkg-buildpackage and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 5 Jun 2018 14:03:38 +0000 (16:03 +0200)]
buildsys: fix upload target
Thomas Lamprecht [Tue, 5 Jun 2018 13:28:52 +0000 (15:28 +0200)]
bum version to 1.6-16
Wolfgang Bumiller [Tue, 15 May 2018 11:38:57 +0000 (13:38 +0200)]
don't check binaries for help and printpod commands
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Thomas Lamprecht [Fri, 9 Mar 2018 15:55:43 +0000 (16:55 +0100)]
refactor synopsis handling
move command synopsis help into the "known command" hash
use that to generalise parameter checking, printing help and
generating POD synopsis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 9 Mar 2018 15:55:42 +0000 (16:55 +0100)]
do not duplicate common docs for CLI help and manpage
add a hidden command which prints the POD of pve-zsync, reusing the
documentation for pve-zsync help CMD
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Wolfgang Link [Fri, 17 Nov 2017 12:34:57 +0000 (13:34 +0100)]
Fix: You can now use the pool as replication source.
In previous version you need a dataset as replication source.
Thomas Lamprecht [Fri, 9 Mar 2018 10:46:23 +0000 (11:46 +0100)]
fix 'use of unitialized value' warning for help command
Thomas Lamprecht [Fri, 9 Mar 2018 10:41:05 +0000 (11:41 +0100)]
fix indetation of file
Thomas Lamprecht [Fri, 9 Mar 2018 10:29:33 +0000 (11:29 +0100)]
fixup HEREDOC usage
Wolfgang Link [Fri, 9 Mar 2018 09:46:10 +0000 (10:46 +0100)]
use for help HEREDOC to make it better readable.
Wolfgang Link [Fri, 9 Mar 2018 09:46:09 +0000 (10:46 +0100)]
add undocumented feature in help.
Wolfgang Bumiller [Fri, 7 Jul 2017 07:45:06 +0000 (09:45 +0200)]
bump version to 1.6-15
Wolfgang Link [Thu, 6 Jul 2017 14:22:58 +0000 (16:22 +0200)]
Fix send_config with IPv6
Add square brackets on IP.
Wolfgang Link [Thu, 23 Mar 2017 10:14:37 +0000 (11:14 +0100)]
fix check for cdrom.
It is false positive if cache mode is set to none.
Wolfgang Bumiller [Fri, 17 Mar 2017 14:41:11 +0000 (15:41 +0100)]
bump version to 1.6-14
Wolfgang Bumiller [Fri, 17 Mar 2017 14:42:17 +0000 (15:42 +0100)]
clean target update
Wolfgang Bumiller [Fri, 17 Mar 2017 14:37:23 +0000 (15:37 +0100)]
cleanup: minor code deduplication
Wolfgang Link [Wed, 15 Mar 2017 10:57:50 +0000 (11:57 +0100)]
Improve error handling in parse_disk.
Wolfgang Link [Wed, 15 Mar 2017 10:57:49 +0000 (11:57 +0100)]
fix #1301 skip if mp has no backup flag.
Wolfgang Link [Wed, 15 Mar 2017 10:57:48 +0000 (11:57 +0100)]
fix wrong quoting in qemu disk check.
Fabian Grünbichler [Mon, 13 Feb 2017 13:28:15 +0000 (14:28 +0100)]
buildsys: add lintian call
Fabian Grünbichler [Mon, 13 Feb 2017 13:28:06 +0000 (14:28 +0100)]
buildsys: use fakeroot for dpkg-deb
Fabian Grünbichler [Mon, 13 Feb 2017 13:27:50 +0000 (14:27 +0100)]
buildsys: job safety
Fabian Grünbichler [Mon, 13 Feb 2017 13:27:34 +0000 (14:27 +0100)]
buildsys: use gzip -n
Wolfgang Bumiller [Tue, 17 Jan 2017 11:55:32 +0000 (12:55 +0100)]
bump version to 1.6-13
Wolfgang Link [Thu, 12 Jan 2017 10:56:53 +0000 (11:56 +0100)]
fix cut_taget_width
Wolfgang Link [Tue, 10 Jan 2017 09:56:52 +0000 (10:56 +0100)]
Fix #1245: Fix snapshot parser.
Make the snapshot parser more exact.
This avoid that a wrong snap-name will returned
if two or more job names has the same beginning.
Dietmar Maurer [Tue, 6 Sep 2016 06:15:28 +0000 (08:15 +0200)]
use new repoman for upload target
Dietmar Maurer [Tue, 6 Sep 2016 06:13:28 +0000 (08:13 +0200)]
bump version toö 1.6-12
Wolfgang Link [Tue, 2 Aug 2016 10:24:50 +0000 (12:24 +0200)]
Add signal handling when we sync.
This gives the capability to clean up, if a error occurs.
Wolfgang Link [Tue, 2 Aug 2016 10:24:49 +0000 (12:24 +0200)]
Add ssh BatchMode.
In case of connection lost the ssh keeps the zfs receive running and it is not possible to make a new sync.
Wolfgang Link [Tue, 2 Aug 2016 09:41:45 +0000 (11:41 +0200)]
Remove switch module.
Switch module is moved out the perl core.
Dietmar Maurer [Thu, 16 Jun 2016 09:46:53 +0000 (11:46 +0200)]
bump version to 1.6-11
Wolfgang Link [Wed, 15 Jun 2016 06:10:33 +0000 (08:10 +0200)]
fix use path as source
Dietmar Maurer [Thu, 16 Jun 2016 09:44:31 +0000 (11:44 +0200)]
fix typo
Wolfgang Link [Wed, 15 Jun 2016 06:10:32 +0000 (08:10 +0200)]
Make return value logical correct
Dietmar Maurer [Thu, 2 Jun 2016 08:58:13 +0000 (10:58 +0200)]
bump version to 1.6-10
Wolfgang Link [Thu, 2 Jun 2016 08:28:19 +0000 (10:28 +0200)]
fix #1004 adapt regex to new schema
Dietmar Maurer [Wed, 9 Mar 2016 13:44:41 +0000 (14:44 +0100)]
bump version to 1.6-9
Fabian Grünbichler [Wed, 9 Mar 2016 11:39:55 +0000 (12:39 +0100)]
Fix variable name
Since $param->{vmid} is never set, this check could not
trigger! using the correct $source->{vmid} works as expected
Fabian Grünbichler [Wed, 9 Mar 2016 11:39:54 +0000 (12:39 +0100)]
fix #910: Correctly handle undef
Dietmar Maurer [Mon, 8 Feb 2016 13:41:05 +0000 (14:41 +0100)]
set RELEASE=4.1
Dietmar Maurer [Mon, 8 Feb 2016 13:40:22 +0000 (14:40 +0100)]
bump version to 1.6-8
Dominik Csapak [Mon, 8 Feb 2016 11:24:59 +0000 (12:24 +0100)]
fix #887 add "--limit" option to cron
add the --limit option when creating the cron entry
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Dietmar Maurer [Thu, 26 Nov 2015 11:08:30 +0000 (12:08 +0100)]
bump version to 1.6-7
Wolfgang Bumiller [Wed, 25 Nov 2015 07:40:48 +0000 (08:40 +0100)]
safer disk matching