-
Notifications
You must be signed in to change notification settings - Fork 309
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
syncoid - Removing poolname because no matching snapshots were found NEWEST SNAPSHOT: syncoid_hostname_2021-04-07... #635
Comments
You can't
Well, I never considered somebody might try to forcibly delete an entire target pool. So there's no trap for that, and you got weird output. =) What you want to do—back up an entire pool—is usually accomplished something like this:
Remember, |
I think that You have not understood the unlogical behavior of your script. If i want to "mirror" pool from drive A to drive B, i would expect command like:
my only aim is to clone the pool, the process should be more friendly than it is now |
As Jim stated before ZFS receive is not designed to overwrite an existing
POOL, no matter what someone has posted somewhere on the internet. It has
nothing to do with syncoid in first place, and nothing what we change here
would "fix" this behaviour.
If you don't like it, feel free to file a ticket with ZFSonLinux.
If you want to get your job done, use the tools provided as they are meant
to be used, syncing pool1 to pool2/dataset1.
Alternatively you should try to design your pools for just storing data in
your datasets, so syncing the complete pool will not be necessary.
If you can find documentation suggesting this wrong usage is fine, we'll be
happy correcting it, if someone has too much free time, he could introduce
a warning, stating the usage is wrong, although most ppl. do not find it
useful safeguarding about everything someone could do wrong (rm -rf /).
slrslr ***@***.***> schrieb am So., 11. Apr. 2021, 10:21:
… I think that You have not understood the unlogical behavior of your script.
If i want to "mirror" pool from drive A to drive B, i would expect command
like:
syncoid pool1 pool2
as mentioned here <https://unix.stackexchange.com/a/638549/46902>
your script suggests that the rarget exist "exists but has no snapshots
matching with pool!
Replication to target would require destroying existing" and offer the
--force-delete switch, which i am not afraid to use since i no longer need
the pool on destination. But after using it your script behave weirdly
flooding the terminal:
Removing backuppoolname because no matching snapshots were found
NEWEST SNAPSHOT: syncoid_hostname_2021-04-07:17:47:02-GMT02:00
Removing backuppoolname because no matching snapshots were found
NEWEST SNAPSHOT: syncoid_hostname_2021-04-07:17:47:02-GMT02:00
Removing backuppoolname because no matching snapshots were found
NEWEST SNAPSHOT: syncoid_hostname_2021-04-07:17:47:02-GMT02:00
Removing backuppoolname because no matching snapshots were found
NEWEST SNAPSHOT: syncoid_hostname_2021-04-07:17:47:02-GMT02:00
...
...
my only aim is to clone the pool, the process should be more friendly than
it is now
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#635 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACWYH7R2SFMDMFTT2U3KYTDTIFLZPANCNFSM42RDVMIA>
.
|
how do You mean this? @jimsalterjrs mentioned different command:
i am having: which i assume means i have two vdevs (or datasets) in my zpool and i want to mirror the pool to the single large backup drive.
(making sure child pool1 does not exist on destination) but when i run:
it is transferring data anyway, so what it means? That after the transfer, the data will be unreadable? |
Any data you stored directly in Eg:
You will get the same Please stop opening new issues about this. The answers will not change. |
So since i had no data in pool itself, but only in its datasets, i was using command syncoid -r pool1 pool2 |
Today i wanted to backup pool and its datasets to my external drive which was empty, so i did Again output:
possibly due to -r switch, else it is weird to show critical error. Second question, i do not see any mention on if i can safely interrupt the sync process (Ctrl+C) and then run "syncoid -r pool pool2" again to resume without data corruption? Thank you |
you need to read up on how ZFS works. You can't replicate the actual root pool dataset, they will never have a matching snapshot. In this case you would use the "--skip--parent" cli option for syncoid so only child datasets are replicated. The error is not weird, but just states why it can't replicate the requested dataset.
ZFS will make sure this is save. If you have a recent version of ZFS syncoid will also attempt to resume the transfer so it doesn't have to resend everything again. |
Foreword: to save reader's time, i highlighted important parts in bold text:
Hello,
i want to sync my pool to different drive, so i have first tried commands like:
zfs snapshot -r pool1@snapshot_name
sudo zfs send -Rv pool1@snapshot_name | sudo zfs receive -Fdus pool2
the -F switch was unable to transfer encrypted dataset ("zfs receive -F cannot be used to destroy an encrypted filesystem"?), so i had to transfer the dataset alone, without -F switch:
sudo zfs send -Rwv pool1/enc@snapshot03 | sudo zfs receive -dus pool2/enc
(-w switch because possible error "may not be sent with properties without the raw flag"), but it created dataset wrongly as a loop2/enc/enc
i had to use
sudo zfs rename pool2/enc pool2/enc2;sudo zfs rename pool2/enc2/enc pool2/enc
after i rebooted and connected drive differently, the resume not worked using token (zfs get all|grep token)
sudo zfs send -t 1-long-phrase-here|sudo zfs receive -Fdus pool2/enc
i have also tried to rename datasets on backup drive and some have different keys than on source drive pool
so i have downloaded syncoid, made it executable:
wget https://raw.githubusercontent.com/jimsalterjrs/sanoid/master/syncoid -O ~/apps/syncoid;chmod -x ~/apps/syncoid
and ran:
./syncoid primarypoolname backuppoolname
so not knowing how to sync properly preserving data i already transferred, i used "--force-delete" switch to previous syncoid command.
Weird output: It was rapidly printing log lines of same type, time:
flood of these messages seems weird.
QUESTIONS:
1)
Why syncoid was flooding the screen with that messages while drive was working, instead of just marking that drive as empty/clean and start copying the data. I would guess zpool destroy command is fast.
2)
if i want to keep my backuppoolname in sync with my primarypoolname is this good way to do it, running "./syncoid primarypoolname backuppoolname" like hourly?
thank you
The text was updated successfully, but these errors were encountered: