Reinstall

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Setup according to documentation, the target machine needs the corresponding public key.
The target machine has none of the earlyer used keypairs when replicating TO the machine. I dont think they show up there when using Semi-Automatic method?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
The target machine has none of the earlyer used keypairs when replicating TO the machine.
As mentioned multiple times now, your remote system needs the public key corresponding to the key pair configured.
Think of it this way: adding your public key to the remote machine installs a door lock which your private key on the source machine can open. If the wrong or no public keys are configured on the destination, your source system cannot open/access anything there.

edit: Sorry if I misunderstood you, yes the generated keypair is only visibile on the source machine in this case, I thought you meant you do see the pub key of the key pair on your remote system.

Since the semiautomatic approach failed, refer to the manual approach in the documentation. I looked over it and it seems rather straightforward, insert the public key at the corresponding places.

I'm failing to understand what the problem is actually, since you already had ssh connections configured before.

edit:

So for the sake of completeness:

I assume this is the keypair you want to use and that is configured with your replication tasks:

1711280973525.png


On the source machine go to System > SSH Keypairs

1711281133430.png


Select and then edit (?) your Runonce3 pair. Download the pub key.

Now, this is what you didn't seem to have done so far:

Log in to the TrueNAS system that needs to register the public key. Go to Accounts > Users and edit the root account. Paste the SSH public key text into the SSH Public Key field.

Add your key here:

1711281237953.png
 
Last edited:

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Ok, many thanks. In between other stuff I did some more investigation and I noticed that annoying message "CRITICAL Web UI HTTPS certificate setup failed". I remember solving that manually years ago. So I tested to setup a new replication of my music dataset and this time with http://targetIP and not https. New keypair was generated and the replication was setup. Next problem was that after starting the replication task it also generated the message:

Destination Snapshots Are Not Related to Replicated Snapshots
Destination dataset does not contain any snapshots that can be used as a basis for the incremental changes in the snapshots being sent. The snapshots in the destination dataset will be deleted and the replication will begin with a complete initial copy.

I honestly don't remember if I used http or https last time and on the other replications. Can it be some certificate problem?

And, will the backup have to do a full replacement of all the files, or does the message only relate to snapshots?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
What a journey :)

"CRITICAL Web UI HTTPS certificate setup failed".
Had this one time, re-uploaded another config and it was gone. Didn't investigate further.

You try re-uploading your config. But then you'd probably need to restart with the ssh key pairs. Or you need to browse the forums for solutions.
Can it be some certificate problem?
Likely. You should have included this error earlier though or I missed it in the first few posts here.


And, will the backup have to do a full replacement of all the files, or does the message only relate to snapshots?
The replication tasks only transfers snapshots. But the first / only snapshot you replicate will contain all files currently present on your dataset.
Do not delete all snapshots of the target dataset if you don't know what you are doing. I'm not 100 % sure with this message, but deleting ALL snapshots may also delete all data on the destination dataset.

Did you replicate music before? Is the target dataset empty/new?
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
The replication tasks only transfers snapshots. But the first / only snapshot you replicate will contain all files currently present on your dataset.

Did you replicate music before? Is the target dataset empty/new?
The datasets on that volume is 99,9% music files, but I also have a home catalogue there that probably has some more files than when the powerout killed my backup servers boot sector some weeks ago, so they are not 100% alike, but 99,9+ % is the same. Ok, whatever, what do we think, skall I just set up a new http replication and call it a day or investigate further?
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Ok I created a new cert and removed the other, changed GUI settings to the new one. All is dandy so far, new identical replication made with https. Lets see tomorrow if it has ran. Thanks for your patience. Sometimes The Truenas Lord Works In Mysterious Ways

Edit. I did a Run Now and the replication did not take more then 30 seconds, so I guess it was incremental after all
 
Last edited:

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Sometimes The Truenas Lord Works In Mysterious Ways
Happy to help, we're all to here to learn.

dit. I did a Run Now and the replication did not take more then 30 seconds, so I guess it was incremental after all
Click on FINISHED in the GUI or check /var/logs/zettarepl.log to see if any snapshots were transferred. If nothing changed then nothing will be transferred.

For future reference, saving the config file does not save /root/.ssh, make backups of that from time to time too.
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Thanks. Just a small update. The replications had to destroy and create new data and snapshots. I thought it just did incremental because it went so fast, but after doing all the separate movie dataset replications I see they are not incremental. The reason the music dataset went so fast was that I hadn't ticked Recursive, so it only replicated the vdev or whatever its called and not the datasets under it. Gonna redo that tomorrow.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
If it's all the same to you and you don't lose data that way, go ahead and replicate everything from scratch.

Did you create new replication tasks for everything or did you just update the ssh credentials?

If you basically just resume your existing replication tasks with new credentials I don't see why you would need to start everything from scratch.

You could share your replication task settings to have a look at that. On top of my head I can't make out what causes that error message.
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
I had to create new replications with new keypairs. Wouldnt take the old for some reason. Now I have tidied up and replicating from scratch. I also made replications on the different datasets on the music machine, so I easily can exclude if there is something I dont want to replicate. I know I could have done that by Exclude, but now I can also replicate smaller parts, if I dont have time for the whole shobang which takes half a day. Thanks!
 
Top