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
acdc0938c9
Merge pull request #884 from dlangille/master
...
sanoid.conf: document two options for recursive
2024-01-26 14:16:44 -05:00
Jim Salter
e0bd202c41
Merge pull request #856 from Pajkastare/master
...
Fixes jimsalterjrs/sanoid#851
2024-01-26 14:16:14 -05:00
Christoph Klaffl
6667f02d35
Update sanoid.conf
2024-01-25 21:13:00 +01:00
Christoph Klaffl
7dae0e5a9b
Merge branch 'master' into master
2024-01-25 21:12:11 +01:00
pajkastare
01053e6cce
Removed unnecessary comment, no code change
2024-01-24 13:51:24 +01:00
pajkastare
a8c15c977a
Fixes jimsalterjrs/sanoid#851 , updated based on review in discussion thread
2024-01-24 13:32:22 +01:00
Dan Langille
9ed32d177d
sanoid.conf: document two options for recursive
...
zfs and yes are the options, one uses zfs, the other sanoid code
2024-01-15 09:56:47 -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
Jim Salter
d60ee1ffc7
Merge pull request #855 from EchterAgo/debian_depends_openzfs_native_deb
...
debian: add openzfs-zfsutils as an alternative to zfsutils-linux
2024-01-13 21:31:50 -05:00
Jim Salter
c30d485383
Merge pull request #872 from Rantherhin/zfs-get
...
fix zfs-get for "--preserve-properties" and tests
2024-01-13 21:30:56 -05:00
Jim Salter
c02defd80b
Merge pull request #841 from thecatontheflat/patch-1
...
Update INSTALL.md
2024-01-13 21:30:38 -05:00
Christoph Klaffl
790ea544ff
Merge branch 'master' into zfs-get
2024-01-13 23:27:38 +01:00
Jim Salter
b100ba43ac
Merge pull request #859 from jan-krieg/master
...
fix "creation"/"guid" regex detection
2024-01-13 16:33:01 -05:00
Christoph Klaffl
0361faac76
Merge branch 'master' into master
2024-01-13 21:56:31 +01:00
Jim Salter
d01eef7555
Merge pull request #846 from jiawen/master-1
...
Fix tiny typo in README.md
2024-01-13 15:47:19 -05: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
Jim Salter
af732daccf
Merge pull request #883 from phreaker0/update-send-recv-options
...
update possible zfs send options
2024-01-13 15:41:41 -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
Jim Salter
680bf23412
Merge pull request #699 from mr-vinn/filter-snaps
...
Add --include-snaps and --exclude-snaps options to syncoid
2024-01-13 14:45:03 -05: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
pajkastare
a5a6fc0f58
Fixes jimsalterjrs/sanoid#851
2023-10-23 21:43:46 +02:00
Axel Gembe
07b6d6344c
debian: add openzfs-zfsutils as an alternative to zfsutils-linux
...
The package produced by ZFS 2.2.0 `make native-deb-utils` is called
`openzfs-zfsutils`.
2023-10-15 14:07:09 +07:00
Jiawen (Kevin) Chen
18ccb7df35
Fix tiny typo in README.md
2023-08-14 22:52:16 -07: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
Vitalii Zurian
a881d22c85
Update INSTALL.md
2023-08-01 10:05:46 +02:00
Jim Salter
61000c9da2
Merge pull request #837 from phreaker0/trim-config-values
...
trim config values
2023-07-25 17:29:06 -04:00
Christoph Klaffl
7ab0ac0cf6
trim config values
2023-07-25 22:56:25 +02:00
Jim Salter
91a960ffc5
Merge pull request #832 from phreaker0/prepare-2.2.0
...
prepare 2.2.0
2023-07-18 12:29:53 -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
Jim Salter
55c5e0ee09
Merge pull request #513 from phreaker0/direct-connection
...
implemented option for direct connection via socat and busybox nc
2023-04-27 14:26:11 -04:00
Jim Salter
c69381e5b9
Merge pull request #819 from phreaker0/fixed-default-options
...
fix default behaviour if run without providing arguments
2023-04-27 14:22:47 -04:00
Christoph Klaffl
1e3874aea5
Merge branch 'master' into direct-connection
2023-04-27 09:16:51 +02:00
Jim Salter
3bde229a61
Merge pull request #622 from rbike/syncoid-hold
...
syncoid hold
2023-04-26 14:02:15 -04:00
Christoph Klaffl
01ace52642
Merge branch 'master' into syncoid-hold
2023-04-26 19:59:20 +02:00
Jim Salter
f8ff5ab0c2
Merge pull request #809 from phreaker0/handle-same-second-bookmarks
...
support bookmarks which are taken in the same second
2023-04-26 13:49:37 -04:00
Christoph Klaffl
cc495183af
fix default behaviour if run without providing arguments
2023-04-26 19:47:49 +02:00