5
0
mirror of git://git.proxmox.com/git/pve-zsync.git synced 2024-12-21 17:33:49 +03:00
Commit Graph

184 Commits

Author SHA1 Message Date
Fiona Ebner
235f034682 bump version to 2.3.1
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-12 09:10:39 +02:00
Fiona Ebner
c9eb356e15 parse disks: improve error messages
The one with the backup flag was reported in the community forum:
https://forum.proxmox.com/threads/77254/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2024-04-11 20:53:14 +02:00
Fiona Ebner
a9d3a98b01 bump version to 2.3.0
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 [ T: only bump minor version for a plain re-build, to avoid that
 users are getting their hopes up to much for a lot new features ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-24 15:57:53 +02:00
Fiona Ebner
41f37cf0d0 d/control: define compat level via build-depends and raise to 13
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 14:49:18 +02:00
Fiona Ebner
a2a6c74c1d d/copyright: convert to machine-readable copyright
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 14:49:18 +02:00
Fiona Ebner
71e1998a3d buildsys: use correct URL when generating d/SOURCE
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 14:49:18 +02:00
Fiona Ebner
502eb089de buildsys: do not specify no-pre-clean option
Otherwise, calling 'make dsc' after 'make deb' leads to the source
package having the additional files:
debian/.debhelper/
debian/pve-zsync.substvars
which lintian helpfully complains about.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 14:05:52 +02:00
Fiona Ebner
bfeb6eedf2 buildsys: expand clean target
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 13:49:56 +02:00
Fiona Ebner
33b6d2a97c buildsys: add sbuild target for convenience
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 13:49:50 +02:00
Fiona Ebner
617f0f2bdb buildsys: derive upload dist automatically
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 13:46:22 +02:00
Fiona Ebner
08c1544857 buildsys: create build directory atomically
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 13:44:54 +02:00
Fiona Ebner
54af66c2ec makefile: convert to use simple parenthesis
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-24 13:44:54 +02:00
Fabian Grünbichler
96e6e41b7e d/control: add missing (build-)dependencies
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-20 14:25:33 +01:00
Thomas Lamprecht
69f72fe8c5 bump version to 2.2.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-12 17:15:53 +02:00
Fabian Ebner
462a6f8104 close #1824: add 'compressed' option enabling -c and -L for send
If one of the features lz4_compress, zstd_compress or large_blocks is
actively used/required by the source dataset, but not enabled on the
destination, zfs send/recv will fail and recommend upgrading the pool.

It's not required that the target dataset is also compressed.
Specifying '--properties' to have the target inherit the compression
property even works during later syncs (but pre-existing data won't be
recompressed automatically then).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-05-12 17:14:46 +02:00
Thomas Lamprecht
aaa924ea55 bump version to 2.2.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-22 13:24:50 +01:00
Fabian Ebner
6345e47d7e parse cron: properly split commandline
Reported in the community forum:
https://forum.proxmox.com/threads/105254/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-02-22 13:21:43 +01:00
Fabian Ebner
e0bbdc77d9 rename encode_cron to parse_cron
The old name is confusing, because "encode" is usually not used when
converting from text to a data structure.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-02-21 15:53:50 +01:00
Thomas Lamprecht
fa45b659b6 buildsys: change upload dist to bullseye
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-12 18:34:13 +01:00
Thomas Lamprecht
9bd459a108 bump version to 2.2.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-12 18:33:05 +01:00
Fabian Ebner
eab51dc0de add tpmstate to disk keys
Ensures that a TPM state volume is synced too.

Reported on the PVE-User mailing list:
https://lists.proxmox.com/pipermail/pve-user/2021-December/172944.html

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-10 13:41:41 +01:00
Thomas Lamprecht
0ee11576c9 bump version to 2.2
switch to native versioning as this is a purely Proxmox-native package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-25 14:00:36 +02:00
Thomas Lamprecht
748c5c569a debian: update dh compat level to 12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-25 13:59:35 +02:00
Fabian Ebner
c335c8f415 fix #3351: allow keeping a different number of snapshots on source and destination
by introducing a new dest-maxsnap parameter which can be used to override
maxsnap for the destination side.

This is useful for backups, as one can potentially save a lot of space on the
source side (or the destination side if one can come up with a use case for
that) by keeping fewer snapshots around.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Fabian Ebner
103f89134f snapshot_destroy: make interface agnostic to source/dest
Also drop the 'method' parameter which is not used consistently (e.g. ignored
in the later half of the very same function, in snapshot_exist, vm_exists,...),
and not documented. Simply rely on the presence of the IP address as is done in
many other places already.

In snapshot_add, there is no need to try and destroy the snapshot on the
destination (did happen previously, because $dest was passed along), because we
just failed to create the snapshot on the source side.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Fabian Ebner
3b115c2845 snapshot_get: make interface agnostic to source/dest
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Fabian Ebner
42b8fc946f remove all old snapshots belonging to a job
Changing maxsnap to something smaller can lead to left-over snaphsots otherwise,
as previously at most one snapshot would be removed, even if there are multiple
old snapshots according to the new setting.

Hopefully nobody relied on the fact that pve-zsync didn't clean up after itself
in such cases...

Negative values and 0 for 'maxsnap' should still be interpreted as infinity to
match the previous behavior.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Fabian Ebner
56ce1be3c7 usage: improve maxsnap description
and also mention that 0 means unlimited.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Fabian Ebner
38478b190d param_to_job: handle --maxsnap 0 on creation
format_job expects the value to be set, so creating a job with '--maxsnap 0' led
to '--maxsnap' being written without an argument, and thus a (for zsync)
unparsable cron file.

However, issuing sync jobs via CLI with '--maxsnap 0' works with 0 being treated
as unlimited. There is a default value, so no need to worry about definedness,
simply pass along the value.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-25 07:18:50 +02:00
Thomas Lamprecht
a340698ddd bump version to 2.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 14:37:15 +02:00
Thomas Lamprecht
5bf16e38c8 man/pod: rework and reword
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 14:36:38 +02:00
Thomas Lamprecht
4941b10d2a man/pod: move full synopsis below description
so that people get to read a short description before viewing the
rather large full command and option synopsis.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 14:35:36 +02:00
Thomas Lamprecht
205d6d8f73 docs: use standard long-opt double --arg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 14:23:35 +02:00
Thomas Lamprecht
ee8772ead8 avoid odd post-if style for die
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 12:13:34 +02:00
Thomas Lamprecht
d4775ec3e9 fix a variable declared in conditional statement
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 12:13:18 +02:00
Fabian Ebner
316d63e9c7 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>
2021-05-04 12:12:51 +02:00
Fabian Ebner
e2c374ad77 parse disks: also include storage ID information
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
0eb3ecdcf4 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>
2021-05-04 12:12:51 +02:00
Fabian Ebner
728a642c53 add create_file_system function
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
1ae8a2136d add check_dataset_exists function
as a generalization and replacement of check_pool_exists.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
5a0499c91f 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>
2021-05-04 12:12:51 +02:00
Fabian Ebner
b6fe42059f usage: fix type for maxsnap
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
53e7ea54e0 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>
2021-05-04 12:12:51 +02:00
Fabian Ebner
5f1187c6c0 copyright: update year
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
1804631943 whitespace fix
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-04 12:12:51 +02:00
Fabian Ebner
5bf0bc3569 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>
2020-12-18 17:41:18 +01:00
Fabian Ebner
d01b047d26 introduce and use read_file helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-18 17:41:18 +01:00
Fabian Ebner
f06c336b2a remove unused function write_cron
Commit 76b2c677f7 replaced it with
update_cron.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-18 17:41:18 +01:00
Dietmar Maurer
39b7694870 bump version to 2.0-4 2020-11-26 05:57:22 +01:00
Bruce Wainer
5d3ff0f6e4 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>
2020-06-24 11:19:17 +02:00