What does the "Restore" button do?

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
1610393058120.png


I have not been able to find a description of the function of "RESTORE" shown above.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Never done it, but if it works the way I would expect it to, it would roll-back to the configuration when the last backup was run.
Like restoring a ZFS snapshot.
The way I understand the "Replication Task" is that you have a pair of FreeNAS / TrueNAS systems setup and one system is sending a periodic snapshot to the other system as a backup. So it is a ZFS snapshot stored remotely. The systems have an established trust relationship, so when you say to restore, the system hosting that backup sends it back.

It is a feature I have not used although I have done ZFS send and receive from the command line and I think this is an automation task to handle similar functionality for purposes of automating backup and restore.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Never done it, but if it works the way I would expect it to, it would roll-back to the configuration when the last backup was run.
Like restoring a ZFS snapshot.
The way I understand the "Replication Task" is that you have a pair of FreeNAS / TrueNAS systems setup and one system is sending a periodic snapshot to the other system as a backup. So it is a ZFS snapshot stored remotely. The systems have an established trust relationship, so when you say to restore, the system hosting that backup sends it back.

It is a feature I have not used although I have done ZFS send and receive from the command line and I think this is an automation task to handle similar functionality for purposes of automating backup and restore.
Thanks, @Chris Moore . But that seems like a "radical" action not to be subject to qualification. Forgive me for looking to the devops for an authoritative answer.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Thanks, @Chris Moore . But that seems like a "radical" action not to be subject to qualification. Forgive me for looking to the devops for an authoritative answer.
Well, I did read the manual: https://www.truenas.com/docs/hub/tasks/scheduled/replication/

I thought I understood it. You could always read it and see what you think.

Also, the older version of the manual might have more detail:
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Thanks, Chris. My apologies if my words offended...

I did RTFM - both the old and the new - before I wrote but didn't find anything about the Restore button (and the11.3-U5 manual has a pic of that GUI page that didn't have the button anyway). I need to take another look.
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
I too am looking for a official answer to this question (or someone who has tried it), i cannot find anything in the manual related to this restore button / function.

(note; Chris Moore's link, is now 404 error, i think this below is the new link:

(^ does not mention restore nor restore button though)

(btw- 404 errors should almost *never* happen and are unacceptable on the web host or orginal-creators part)

If i end up setting up 2x test systems and do the restore button , i will post back here with an answer (however im not confident enough to try the restore button on the current replication of my main FN system, i have setup).
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
(btw- 404 errors should almost *never* happen and are unacceptable on the web host or orginal-creators part)
I don't know why you are getting a 404 error. When I click the link, it still goes to the manual for the User Guide for FreeNAS v 11.3-U5. There is a redirection happening because the site name did change. Maybe you have some antivirus or something preventing the redirect from working.

I have still not had occasion to create a remote replication task and the GUI does not appear to include the restore button referenced in the original post. I have had occasion to mount local snapshots but restoring a remote snapshot would take as much time as sending the snapshot initially did, so it would only be a disaster recovery of last resort.
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
thanks for the reply, im no longer getting the 404 error, so it must have been a temporary issue or change on the web server side. ( at the time of my earlier reply, i did see a ixSys 404 error page)

I can confirm that on my replication testing setup of TrueNAS-12.0-U8.1 the "Restore" button does exist, exactly as the OP showed, (however i have not tried TN v13.x yet, so cant comment on that version).

fwiw- in the case of PULL replication tasks, pressing the restore button gives you the option to "restore" it to a local pool (which usually is not what the user would be looking to do, as they would already have a local copy from the replication itself).
I ended up doing some more tests and finalized the the CLI command i would use in a disaster / restore scenario
(please TEST this yourself, and do not copy/paste, as it can be destructive if you are not aware of what you are running - and in generally one should try to stick to the GUI):
I tested these commands below, several times, from a TrueNAS-12.0-U8.1 machine, restoring to (a network local) FreeNas/TN v11.2-U5 , then to a TN 11.3, and finally to a TN 12.0u8.1 (commands worked great on all).

Code:
# NB: in all cases the -v  is optional, and is just for verbose / extra output (else you only get output on an error or issue)

# TO RESTORE to a remote machine ( btw- in my case im using PULL type replication tasks)
zfs send -v myPool/MyDataset@auto-20220608.0600-3m | ssh <remoteIP> zfs recv -v remotePool/remoteDataset

# or if you want to restore the dataset AND all snapshots (ie prior snapshots):
zfs send -v -R myPool/MyDataset@auto-20220608.0600-3m | ssh <remoteIP> zfs recv -v remotePool/remoteDataset

#if you want to restore an encrypted Dataset, and all snaps / properties. (nb; dataset will endup locked on remotePool , and you will need to unlock it to access it, post transfer, as expected):
zfs send -v -R -w myPool/MyDataset@auto-20220608.0600-3m | ssh <remoteIP> zfs recv -v remotePool/remoteDataset
 
Top