Commit Graph

928 Commits

Author SHA1 Message Date
evan314159 f6f0ba7c37
Merge 385da8bd49 into 2c98f0501c 2025-08-24 16:19:52 +00:00
Jim Salter 2c98f0501c
Merge pull request #634 from asche77/patch-1
Update INSTALL.md to include OmniOS installation instructions
2025-08-24 11:29:35 -04:00
Jim Salter 0f3a9c94d9
Merge branch 'master' into patch-1 2025-08-24 11:28:40 -04:00
Jim Salter a6728e48de
Merge pull request #996 from jjakob/fix_directtimeout
syncoid: fix directtimeout in directmbuffer mode
2025-08-24 10:56:44 -04:00
Jim Salter 393a4672e5
Merge pull request #1023 from phreaker0/fix-file-handle-conflict
fixed file handle conflict
2025-08-24 10:50:58 -04:00
Christoph Klaffl efd52f416d
fixed file handle conflict 2025-08-12 14:19:47 +02:00
Evan 385da8bd49 When preserving inherited properties, also verify that the value of the
inherited property would be the same at the destination. This can occur
when replicating partial dataset trees without the parents that set the
property locally.
2025-06-28 18:05:13 +08:00
Evan da5b10b722 syncoid: preserve inherited properties
syncoid --preserve-properties preserves locally set properties but not inherited properties that would be not be inherited at the destination. Example:

tank                     local     acltype=posix (default for TrueNAS pools)
tank/home                local     acltype=nfsv4
tank/home/evan inherits  local     acltype=nfsv4
tank/home/evan/Documents inherited acltype=nfsv4
backup                   local     acltype=posix (default for TrueNAS pools)

syncoid --recursive --preserve-properties tank/home/evan backup/evan

replicates the datasets but with acltype inherited from backup = posix, and not acltype=nfsv4 as was inherited from tank/home.

The desired result in this case would be to set acltype=nfsv4 locally on backup/evan and inherit acltype on backup/evan/music. It would also need to preserve some settings that are intended to be different, for example setting copies=2 on backup, or excluding mountpoint.

This PR implements a new command line option --preserve-inherited-properties that preserves properties where they were inherited in their source location but would not otherwise be inherited in their destination.

Real output in my enviroment after running syncoid syncoid --recursive --preserve-inherited-properties --recvoptions="u o readonly=on x mountpoint" tank backup

> zfs get acltype,mountpoint,readonly -r backup -t fs

NAME                                      PROPERTY    VALUE                                                    SOURCE
backup                                    acltype     posix                                                    local
backup                                    mountpoint  /mnt/backup                                              local
backup                                    readonly    off                                                      default
backup/tank                               acltype     posix                                                    local
backup/tank                               mountpoint  /mnt/backup/tank                               inherited from backup
backup/tank                               readonly    on                                                       local
backup/tank/home                          acltype     nfsv4                                                    local
backup/tank/home                          mountpoint  /mnt/backup/tank/home                          inherited from backup
backup/tank/home                          readonly    on                                                       local
backup/tank/home/evan                     acltype     nfsv4                                                    inherited from backup/tank/home
backup/tank/home/evan                     mountpoint  /mnt/backup/tank/home/evan                     inherited from backup
backup/tank/home/evan                     readonly    on                                                       local
backup/tank/home/evan/Documents           acltype     nfsv4                                                    inherited from backup/tank/home
backup/tank/home/evan/Documents           mountpoint  /mnt/backup/tank/home/evan/Documents           inherited from backup
backup/tank/home/evan/Documents           readonly    on                                                       local

This change:
- adds --preserve-inherited-properties command line option with --help
- implicitly sets --preserve-properties if --preserve-inherited-properties is set
- renames getlocalzfsvalues to getzfspropertiestopreserve to reflect its purpose
- returns local and inherited properties if --preserve-inherited-properties is set, otherwise local properties only
- skips propeties that are set or excluded in recvoptions
- skips properties that would be inherited correctly at the destination unless they were locally set at the source
- adds keylocation to blacklist (along with other encryption-related properties)
2025-06-28 16:02:37 +08:00
Jim Salter 940a84e21f
Merge pull request #1008 from aabccd021/master
Fix readme formatting
2025-06-12 09:53:57 -04:00
aabccd021 680194fa33 Fix readme formatting 2025-06-12 12:58:26 +07:00
Jim Salter 8d4abf14b2
Merge pull request #1006 from phreaker0/prepare-2.3.0
prepare 2.3.0
2025-06-11 08:10:52 -04:00
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 b9bcb6a9d3
Merge branch 'cache-add' into prepare-2.3.0 2025-06-05 22:44:59 +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 b1f191ff8f
Merge branch 'pr-964' into prepare-2.3.0 2025-06-05 22:42:10 +02:00
Christoph Klaffl 003dd4635a
Merge branch 'patch-1' into prepare-2.3.0 2025-06-05 22:40:47 +02:00
Christoph Klaffl 1915ea29a2
Merge branch 'ignore-duplicate-template-keys' into prepare-2.3.0 2025-06-05 22:40:11 +02:00
Christoph Klaffl 6bda64508b
Merge branch 'ossimoi/master' into prepare-2.3.0 2025-06-05 22:39:38 +02:00
Christoph Klaffl 5109a51b68
Merge branch 'fix-debian-package' into prepare-2.3.0 2025-06-05 22:37:29 +02:00
Christoph Klaffl 67b9dec294
Merge branch 'fix/918' into prepare-2.3.0 2025-06-05 22:37:14 +02:00
Christoph Klaffl 44a9b71d5f
Merge branch 'dev/sde/remove-force-prune' into prepare-2.3.0 2025-06-05 22:36:12 +02:00
Christoph Klaffl 27fc179490
implemented adding of taken snapshot to the cache file and a new parameter for setting an custom cache expire time 2025-06-05 21:59:30 +02:00
Jernej Jakob 749490830f
syncoid: fix directtimeout in directmbuffer mode
If --insecure-direct-connection contained 4 parts (including the
',mbuffer' at the end), the 3rd part (timeout) was silently ignored
and left at the default 60s.

Do not ignore the timeout part even in directmbuffer mode.
2025-03-31 14:54:46 +02:00
Jim Salter 6beef5fee6
Update INSTALL.md
add cd /tmp to Debian and Ubuntu package build instructions, to avoid newbies getting confused by limited permissions under eg /root

add reference to dependency on Capture::Tiny in sanoid and syncoid
2025-02-11 19:54:53 -05: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
Christopher Morrow f4e425d682
Add Install instructions for EL9 systems
Added to INSTALL.md the command to add the `crb` repo for Rocky Linux 9 and AlmaLinux 9.
Necessary for perl-Capture-Tiny package.
2024-11-27 18:24:08 -08:00
Alex Garel 19f8877dcb
docs: clarify that scripts are run only if autosnap or autoprune are set 2024-11-05 11:20:31 +01:00
Jim Salter 2259625b08
Merge pull request #955 from MynaITLabs/patch-1
Update INSTALL.md
2024-09-25 21:33:20 -04:00
Myna IT Labs 4e545ada0c
Update INSTALL.md
Fixed bad link to CentOS section.  And clarified that this area is applicable for RHEL family of popular OS distributions:  RHEL/CentOS/AlmaLinux
2024-09-23 14:29:14 -07:00
Christoph Klaffl 3942254e30
ignore duplicate template keys 2024-09-20 07:38:12 +02:00
Jim Salter 8fa906b971
Update sanoid.conf
further clarify recursion=zfs vs recursion=yes
2024-09-19 23:43:39 -04:00
Jim Salter 826d4d1c07
Merge pull request #946 from rightaditya/master
Fix single quotes that should be double quotes
2024-08-09 19:32:18 -04:00
Aditya Bhargava 81938c3952 Fix single quotes that should be double quotes 2024-08-09 18:46:10 -04:00
Ossi A b27b120c19 syncoid: add -X send option in special options 2024-06-25 11:11:29 +03:00
Christoph Klaffl cf0ecb30ae
added deprecation warning for removed force-prune 2024-06-04 08:40:41 +02:00
Christoph Klaffl 7ba73acea9
Merge branch 'master' into dev/sde/remove-force-prune 2024-06-04 08:27:45 +02:00
Christoph Klaffl 4d39e39217
fix debian packaging with debian 12 and ubuntu 24.04 2024-06-03 23:46:54 +02:00
Jim Salter a7e6c2db68
Merge pull request #920 from phreaker0/dataset-cache
[sanoid] implemented dataset cache and fix race conditions
2024-04-26 16:28:48 -04: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
Christoph Klaffl 9c0468ee45
write cache files in an atomic way to prevent race conditions 2024-04-24 00:09:40 +02:00
Christoph Klaffl 6f74c7c4b3
* improve performance (especially for monitor commands) by caching the dataset list
* list snapshots only when needed
2024-04-23 23:38:47 +02: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 fa2c16d65a
Merge pull request #905 from phreaker0/findoid-relative-path
[findoid] support relative paths
2024-04-22 12:13:43 -04:00
Jim Salter 1207ea0062
Merge pull request #904 from phreaker0/tests-restructure
test adaptions
2024-04-22 12:13:28 -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
Jim Salter 1ee6815e5e
Merge pull request #910 from phreaker0/improve-output
added missing status information about what is done and provide more details
2024-04-22 12:12:28 -04:00