SOLVED Help to Recreate a Pool from Backup (Removable Local Backup/Restore)

Status
Not open for further replies.

NASbox

Guru
Joined
May 8, 2012
Messages
650
I want to expand my main pool (TANK) from 4 disks to 8 disks in RAIDZ2 which if I understand correctly means that I need to destroy the pool and restore the data.

I created a backup by using the the automatic snapshot function and then a zfs send/receive from the command line. The following seemed to work:
Code:
zfs send -v -R TANK@auto-20171229.1433-2w | zfs recv -F BACKUP01/TANK
Can someone confirm if I did the backup correctly? (zfs list follows):
Code:
freenas# zfs list -t all
NAME															USED  AVAIL  REFER  MOUNTPOINT
BACKUP01													   6.77T   262G	88K  /mnt/BACKUP01
BACKUP01/TANK												  6.77T   262G   230G  /mnt/BACKUP01/TANK
BACKUP01/TANK@auto-20171229.1433-2w								0	  -   230G  -
BACKUP01/TANK/mdata											95.7G   262G  95.7G  /mnt/BACKUP01/TANK/mdata
BACKUP01/TANK/mdata@auto-20171229.1433-2w						  0	  -  95.7G  -
BACKUP01/TANK/cleanup										   588G   262G   588G  /mnt/BACKUP01/TANK/cleanup
BACKUP01/TANK/cleanup@auto-20171229.1433-2w						0	  -   588G  -
BACKUP01/TANK/jails											  88K   262G	88K  /mnt/BACKUP01/TANK/jails
BACKUP01/TANK/jails@auto-20171229.1433-2w						  0	  -	88K  -
BACKUP01/TANK/library										  4.28T   262G  4.28T  /mnt/BACKUP01/TANK/library
BACKUP01/TANK/library@manual-20171228							  0	  -  4.28T  -
BACKUP01/TANK/library@auto-20171229.1433-2w						0	  -  4.28T  -
BACKUP01/TANK/special										   505G   262G   505G  /mnt/BACKUP01/TANK/special
BACKUP01/TANK/special@manual-20171228							  0	  -   505G  -
BACKUP01/TANK/special@auto-20171229.1433-2w						0	  -   505G  -
BACKUP01/TANK/audio											 312G   262G   312G  /mnt/BACKUP01/TANK/audio
BACKUP01/TANK/audio@manual-20170822								0	  -   312G  -
BACKUP01/TANK/audio@manual-20171228								0	  -   312G  -
BACKUP01/TANK/audio@auto-20171229.1433-2w						  0	  -   312G  -
BACKUP01/TANK/video											 818G   262G   818G  /mnt/BACKUP01/TANK/video
BACKUP01/TANK/video@manual-20170822								0	  -   818G  -
BACKUP01/TANK/video@manual-20171228								0	  -   818G  -
BACKUP01/TANK/video@auto-20171229.1433-2w						  0	  -   818G  -
TANK														   6.79T  3.45T   231G  /mnt/TANK
TANK@auto-20171229.1433-2w										 0	  -   231G  -
TANK/mdata													 95.6G  3.45T  95.6G  /mnt/TANK/mdata
TANK/mdata@auto-20171229.1433-2w								   0	  -  95.6G  -
TANK/cleanup													599G  3.45T   599G  /mnt/TANK/cleanup
TANK/cleanup@auto-20171229.1433-2w								 0	  -   599G  -
TANK/jails													  256K  3.45T   256K  /mnt/TANK/jails
TANK/jails@auto-20171229.1433-2w								   0	  -   256K  -
TANK/library												   4.29T  3.45T  4.29T  /mnt/TANK/library
TANK/library@manual-20171228									   0	  -  4.29T  -
TANK/library@auto-20171229.1433-2w								 0	  -  4.29T  -
TANK/special													505G  3.45T   505G  /mnt/TANK/special
TANK/special@manual-20171228									   0	  -   505G  -
TANK/special@auto-20171229.1433-2w								 0	  -   505G  -
TANK/audio													  313G  3.45T   313G  /mnt/TANK/audio
TANK/audio@manual-20170822									 11.6K	  -   313G  -
TANK/audio@manual-20171228										 0	  -   313G  -
TANK/audio@auto-20171229.1433-2w								   0	  -   313G  -
TANK/video													  818G  3.45T   818G  /mnt/TANK/video
TANK/video@manual-20170822									 11.6K	  -   818G  -
TANK/video@manual-20171228										 0	  -   818G  -
TANK/video@auto-20171229.1433-2w								   0	  -   818G  -
freenas-boot												   4.04G   103G   176K  none
freenas-boot/.system										   84.8M   103G  2.89M  legacy
freenas-boot/.system/configs-66c5ca0d9b594ab08a0a7191ac86a4a6  6.43M   103G  6.43M  legacy
freenas-boot/.system/configs-9d613be4d69d4eaa9ab03b2439285b53   136K   103G   136K  legacy
freenas-boot/.system/cores									 3.94M   103G  3.94M  legacy
freenas-boot/.system/rrd-66c5ca0d9b594ab08a0a7191ac86a4a6	  24.2M   103G  24.2M  legacy
freenas-boot/.system/rrd-9d613be4d69d4eaa9ab03b2439285b53	  3.85M   103G  3.85M  legacy
freenas-boot/.system/samba4									 456K   103G   456K  legacy
freenas-boot/.system/syslog-66c5ca0d9b594ab08a0a7191ac86a4a6   42.6M   103G  42.6M  legacy
freenas-boot/.system/syslog-9d613be4d69d4eaa9ab03b2439285b53	296K   103G   296K  legacy
freenas-boot/ROOT											  3.94G   103G   136K  none
freenas-boot/ROOT/11.0-U3									   232K   103G   970M  /
freenas-boot/ROOT/11.0-U4									   248K   103G   973M  /
freenas-boot/ROOT/11.1-RELEASE								 3.94G   103G  1.08G  /
freenas-boot/ROOT/11.1-RELEASE@2017-09-20-01:21:53			 4.05M	  -   980M  -
freenas-boot/ROOT/11.1-RELEASE@2017-09-19-23:36:41			 4.06M	  -   980M  -
freenas-boot/ROOT/11.1-RELEASE@2017-09-29-02:04:28			  969M	  -   970M  -
freenas-boot/ROOT/11.1-RELEASE@2017-12-15-20:16:16			  971M	  -   973M  -
freenas-boot/ROOT/Initial-Install								 8K   103G   980M  legacy
freenas-boot/ROOT/default									   232K   103G   980M  legacy
freenas-boot/grub											  7.82M   103G  7.82M  legacy
I created 2 separate copies on 2 disks so have redundant backups.

My plan is to use the GUI to destroy the 4 disk pool TANK and then recreate a new pool called TANK with 8 disks in RAIDZ2, but I'm a bit unclear as to how to copy the data back.

Would this be correct?
Code:
zfs send -v -R BACKUP01/TANK@auto-20171229.1433-2w | zfs recv -F TANK
If I recall correctly the F forces it to overwrite since the pool name TANK will exist because I need to name the pool when I create it. If I used the same syntax as I used for the backup, I would end up with TANK/TANK... which not what I want.

Thanks in advance for any assistance/suggestions.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Can someone please tell me if I have the correct restoration procedure to recreate pool TANK from BACKUP01 (above). If I need to supply more information, please let me know.

Use the GUI to recreate pool TANK

Then zfs send -v -R BACKUP01/TANK@auto-20171229.1433-2w | zfs recv -F TANK

I only need the snapshots ending in auto-20171229.1433-2w, so it doesn't matter if the older snapshots get copied or not.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
I decided to edit the title and report back to the group in the hope that it might help someone else with a similar problem.

There doesn't seem to be much on local zfs replication, and/or removable backups, and I didn't get any answers, so I had no alternative but to try it, and fortunately the operations documented above worked for me.

FYI: I haven't had chance to investigate yet, but here is an open source project called syncoid which is a collection of perl scripts that is supposed to make scripting of zfs replication tasks easy. Since it's just perl scripts, it should be easy to install locally without interfering anything. Please report back to the group if you discover anything.
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Status
Not open for further replies.
Top