Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with --delete-target-snapshots and --insecure-direct-connection #822

Closed
revilo951 opened this issue May 7, 2023 · 8 comments
Closed

Comments

@revilo951
Copy link

revilo951 commented May 7, 2023

Using --delete-target-snapshots --insecure-direct-connection on a fresh install from Master results in:

Unknown option: delete-target-snapshots
Unknown option: insecure-direct-connection
@ipaqmaster
Copy link

Fresh install of what distribution? And what version of the package?

@revilo951
Copy link
Author

Great question.

Debian 11 Bullseye (Proxmox v7)

syncoid version 2.1.0 (Installed 2 or 3 days ago via instructions on INSTALL.md)

@jimsalterjrs
Copy link
Owner

Actually not v2.1.0--installed from master, after the last round of merges. What's in master right now technically doesn't have a version number yet. It doesn't get a version number until it's packaged up as the next release.

@revilo951
Copy link
Author

Ah, that makes sense. Would you like me to have a go at a PR updating the docs to reflect that?

If I understand correctly, for those features, someone would need to clone the repo and build themselves, as they aren't built into packaged releases yet?

@joelishness
Copy link
Contributor

joelishness commented May 26, 2023

Is there a workaround to --delete-target-snapshots issue?
Like, is there a zfs receive option that could be specified in --recvoptions= ?

edit: maybe this?
-F Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by zfs send -R [-i|-I]), destroy snapshots and file systems that do not exist on the sending side.

@crpb
Copy link

crpb commented May 31, 2023

I just tried the current git-version it with a self-built package and i'm very happy about those new features.

--delete-target-snapshots works in my cases with no issues so far

I was about to tinker in the code to disable the cache-update for the whole system as my targets are only dataset-children with zfs allow ... for the specific users.
Luckily i skimmed the commits 🙈

Now i can remove my Target-Side $Users cpan and $HOME/bin setup again 👍

Just fyi, what works for me

#!/bin/bash
if [ "$1" = "-d" ]; then DEBUG="--debug"; fi
SOURCEPOOL=rpool
SSHUSER=USERNAME
SSHHOST=HOSTNAME.DOMAIN.TLD
SSHPORT=REMOTEPORT
SSHKEY=~/.ssh/id_ed25519
TARGETPOOL=POOLNAME
TARGETDATASET=USERNAME/BACKS/HOSTNAME
EXCLUDES='rpool/(tmp|usr|var/(cache|lib|mail|spool|tmp))'
SYNCOIDOPTS=( --compress=zstd-fast
              --delete-target-snapshots
              --exclude="${EXCLUDES}"
              --force-delete
              --no-privilege-elevation
              --no-sync-snap
              --recursive
              --sshkey="${SSHKEY}"
              --sshport="${SSHPORT}" )
/usr/sbin/syncoid ${DEBUG} \
                  ${SYNCOIDOPTS[@]} \
                  ${SOURCEPOOL} \
                  ${SSHUSER}@${SSHHOST}:${TARGETPOOL}/${TARGETDATASET} \
                  | systemd-cat -t SYNCOID

@nickcmaynard
Copy link

@jimsalterjrs I hate to ask directly, but it would be super helpful if these features from master could make it into a release (and thus distro packages). What plans do you have for a sanoid/syncoid minor release?

@phreaker0
Copy link
Collaborator

https://github.com/jimsalterjrs/sanoid/releases/tag/v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants