Commit Graph

362 Commits

Author SHA1 Message Date
Christoph Klaffl becec66320
prepare v2.3.0 2025-06-09 23:21:44 +02:00
Adam Fulton aa2c693e62
fix(syncoid): regather $snaps on --delete-target-snapshots flag 2025-06-05 23:31:47 +02:00
Christoph Klaffl b794da6f14
Revert "Merge pull request #818 from Deltik/fix/815"
This reverts commit 7c225a1d7b, reversing
changes made to acdc0938c9.
2025-06-05 23:23:30 +02:00
Christoph Klaffl f0a2b120d9
Merge branch 'blacklist-encryption' into prepare-2.3.0 2025-06-05 22:42:49 +02:00
Christoph Klaffl a546b7d162
Merge branch 'fix-warning' into prepare-2.3.0 2025-06-05 22:42:22 +02:00
Christoph Klaffl 6bda64508b
Merge branch 'ossimoi/master' into prepare-2.3.0 2025-06-05 22:39:38 +02:00
Christoph Klaffl 7062b7347e
blacklist encryption property from preserving 2025-01-24 14:01:59 +01:00
Christoph Klaffl 4a9db9541d
fix warning in edge cases ("Use of uninitialized value in numeric comparison") 2024-12-03 19:32:47 +01:00
Ossi A b27b120c19 syncoid: add -X send option in special options 2024-06-25 11:11:29 +03:00
Nick Liu fab4b4076c
fix(syncoid): `zfs send` arg allowlist when sendsource is receivetoken
The `runsynccmd` subroutine was not matching the `$sendsource` when a
receive resume token is passed in. All usages that pass in the receive
resume token do not begin with a space; instead, they start with `-t `.

Fixes: https://github.com/jimsalterjrs/sanoid/issues/918
2024-04-26 02:18:19 -05:00
Jim Salter b31ed6e325
Merge pull request #916 from 0xFelix/zstdmt
syncoid: Add zstdmt compress options
2024-04-22 12:14:40 -04:00
Jim Salter d800e5e17d
Merge pull request #903 from spicyFajitas/regather_snapshots--delete-target-snaps_task
fix(syncoid): regather $snaps on --delete-target-snapshots flag
2024-04-22 12:12:58 -04:00
0xFelix 8b7d29d5a0 syncoid: Add zstdmt compress options
Add the zstdmt-fast and zstdmt-slow compress options to allow use of
multithreading when using zstd compression.

Signed-off-by: 0xFelix <felix@matouschek.org>
2024-04-20 18:41:43 +02:00
Christoph Klaffl b4c8e4b499
Merge branch 'master' into improve-output 2024-04-18 14:30:04 +02:00
Christoph Klaffl 6c1e31e551
handle error output for filtered replications 2024-04-18 08:22:37 +02:00
Christoph Klaffl eb4fe8a01c
added missing status information about what is done and provide more details 2024-04-18 07:42:47 +02:00
Christoph Klaffl a059054ffb
rename ssh control socket to avoid problem with length limits and conflicts 2024-04-17 08:14:04 +02:00
Adam Fulton d08b2882b7 finish rebase to master 2024-04-01 13:16:16 -05:00
Adam Fulton f89372967f fix(syncoid): regather $snaps on --delete-target-snapshots flag 2024-04-01 13:12:59 -05:00
Nick Liu ab361017e7
feat(syncoid): Match snapshots to bookmarks by `createtxg` if possible
This is a continuation of a previous commit to sort snapshots by
`createtxg` if possible.  Now, we have to match the behavior when
selecting an appropriate snapshot based on the transaction group of the
relevant bookmark in `syncdataset()`.

Supersedes: https://github.com/jimsalterjrs/sanoid/pull/667
2023-04-25 17:07:32 -05:00
Nick Liu 8907e0cb2f
feat(syncoid): Sort snapshots by `createtxg` if possible
It is possible for `creation` of a subsequent snapshot to be in the past
compared to the current snapshot due to system clock discrepancies,
which leads to earlier snapshots not being replicated in the initial
syncoid sync.

Also, `syncoid --no-sync-snap` might not pick up the most recently taken
snapshot if the clock moved backwards before taking that snapshot.

Sorting snapshots by the `createtxg` value is reliable and documented
in `man 8 zfsprops` as the proper way to order snapshots, but it was not
available in ZFS versions before 0.7.  To maintain backwards
compatibility, the sorting falls back to sorting by the `creation`
property, which was the old behavior.

Fixes: https://github.com/jimsalterjrs/sanoid/issues/815
2023-04-28 00:43:47 -05:00
Nick Liu 8fabaae5b8
feat(syncoid): Add "createtxg" property to `getsnaps`
The `getsnaps` subroutine now retrieves the "createtxg" property of the
snapshot.

This is necessary to support the fix for
https://github.com/jimsalterjrs/sanoid/issues/815 (Syncoid: Data loss
because getoldestsnapshot() might not choose the first snapshot).
2023-04-25 14:01:54 -05:00
Nick Liu e301b5b153
refactor(syncoid): Simplify getsnaps to parse a hash rather than lines
* The part that was "a little obnoxious" has been rewritten to extract
  the desired properties in a single loop after importing each line into
  a hash rather than processing line by line with a state tracking flag.
* The `getsnapsfallback` subroutine had duplicated logic that has been
  absorbed into `getsnaps` with a recursion argument to enable the
  fallback mode.
2023-04-25 13:58:40 -05:00
Jim Salter a5fa5e7bad
Merge pull request #843 from mjeanson/master
Fix typos in syncoid documentation
2024-01-13 21:32:08 -05:00
Christoph Klaffl 790ea544ff
Merge branch 'master' into zfs-get 2024-01-13 23:27:38 +01:00
Christoph Klaffl 0361faac76
Merge branch 'master' into master 2024-01-13 21:56:31 +01:00
Jim Salter 54c2dacd20
Merge pull request #881 from phreaker0/force-delete-skip-root
prevent destroying of root dataset which leads to infinite loop
2024-01-13 15:44:18 -05:00
Jim Salter 4e8b881da7
Merge pull request #882 from phreaker0/preserve-properties-handle-special-symbols
escape property key and value pair in case of property preservation
2024-01-13 15:41:57 -05:00
Christoph Klaffl becddb854f
Merge branch 'master' into preserve-properties-handle-special-symbols 2024-01-13 21:34:45 +01:00
Christoph Klaffl 85e7fca30e
Merge branch 'master' into force-delete-skip-root 2024-01-13 21:29:40 +01:00
Christoph Klaffl ca6e60b920
Merge branch 'master' into update-send-recv-options 2024-01-13 21:22:51 +01:00
Christoph Klaffl 8ce1ea4dc8
fixed refactoring regression 2024-01-13 19:49:20 +01:00
Christoph Klaffl e9eb05e840
Merge branch 'master' into filter-snaps 2024-01-13 19:40:28 +01:00
Christoph Klaffl 6761004939
update possible zfs send options 2024-01-11 21:02:04 +01:00
Christoph Klaffl 4369576ac4
escape property key and value pair in case of property preservation 2024-01-09 20:40:33 +01:00
Christoph Klaffl 48d89c785e
prevent destroying of root dataset which leads to infinite loop because it can't be destroyed 2024-01-09 19:53:03 +01:00
Justin Wolf dbbaac8ac3 modify zfs-get argument order for portability 2023-12-10 21:16:42 -06:00
Jan Krieg 605b7bac1c
fix "creation"/"guid" regex detection 2023-10-29 17:46:28 +01:00
Michael Jeanson 6b874a7e3c Fix typos in syncoid documentation
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2023-08-03 16:17:51 -04:00
Christoph Klaffl 538416879d
prepare 2.2.0 2023-07-18 18:09:51 +02:00
Christoph Klaffl f3d4d309b5
implemented flag for preserving properties without the zfs -p flag 2023-07-18 08:38:40 +02:00
Christoph Klaffl 1e3874aea5
Merge branch 'master' into direct-connection 2023-04-27 09:16:51 +02:00
Christoph Klaffl 01ace52642
Merge branch 'master' into syncoid-hold 2023-04-26 19:59:20 +02:00
Christoph Klaffl 2143f629d5
Merge remote-tracking branch 'upstream/master' into handle-same-second-bookmarks 2023-04-26 19:40:24 +02:00
Jim Salter e6585e7ee5
Merge pull request #746 from mavhc/master
Removed unneeded 2>/dev/null from mbufferoptions
2023-04-26 13:00:03 -04:00
Mathieu Arnold 2f706a4ae1
Batch snapshot deletion.
This is to prevent a problem with a large amount of snapshots which
exceed the allowed shell command length.
2023-04-08 10:09:11 +02:00
Mathieu Arnold ecd1400539
Handle output/errors of those zfs destroy commands.
If there was an obsolete remote syncoid_hostname_* snapshot that did not
get removed at the correct time, for some reason, like, maybe, network
problems, it would have been cleaned up in pruneoldsyncsnaps just before
this code, and we would get a strange error message saying:

    could not find any snapshots to destroy; check snapshot names.

Also, when using --quiet, do not output anything, as failing to remove
an obsolete snapshot is not really a big problem.
2023-04-08 09:45:01 +02:00
Mathieu Arnold 63dd819ec5
Rename option. 2023-04-08 09:45:00 +02:00
Mathieu Arnold 2d89434ac3
Add target snapshot deletion. 2023-04-08 09:42:58 +02:00
Christoph Klaffl 9e04911945
Merge branch 'master' into direct-connection 2023-03-24 09:16:13 +01:00