Incorrect replication is not the fastest. mv/cp is the fastest. Zfs send/recv would probably be my choice though.zfs send/recv as pointed out by SweetAndLow would be my preferred solution. Most reliable and it will retain the entire history of your pool. Something cp/mv won't be able to give you.
Even then, I believe replication is the fastest of all.
zfs send old@now | ssh root@IPADDRESS "zfs receive new"
You can use the following command:One more question, if I have many datasets in pool "old" (like old/d1, old/d2,old/d3), Is there a way to migrate them by
Code:zfs send old@now | ssh root@IPADDRESS "zfs receive new"
so everything can be in pool "new" and I needn't send them one by one ?
zfs send -vv -R old@now | ssh -i /data/ssh/replication root@IPADDRESS zfs receive -vv -F new
zfs send -vv -I old@now old@today | ssh -i /data/ssh/replication root@IPADDRESS zfs receive -vv -F new
zfs send -vv -R old@now | ssh -i /data/ssh/replication root@IPADDRESS zfs receive -vv -F new/my_new_dataset
zfs send -vv -I old@now old@today | ssh -i /data/ssh/replication root@IPADDRESS zfs receive -vv -F new/my_new_dataset
root@freenas[~]# zfs send -vv -R zfsrz2@a | ssh -i /data/ssh/replication root@192.168.10.179 zfs receive -vv -F zfsrz2 full send of zfsrz2@a estimated size is 12.1K full send of zfsrz2/share@a estimated size is 12.1K full send of zfsrz2/.system@a estimated size is 13.1K full send of zfsrz2/.system/configs-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 12.1K full send of zfsrz2/.system/rrd-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 97.1M full send of zfsrz2/.system/syslog-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 123K full send of zfsrz2/.system/webui@a estimated size is 12.1K full send of zfsrz2/.system/cores@a estimated size is 12.1K full send of zfsrz2/.system/samba4@a estimated size is 1.18M full send of zfsrz2/bak@a estimated size is 12.1K full send of zfsrz2/pdata@a estimated size is 12.1K full send of zfsrz2/pdata/seafile@a estimated size is 12.1K total estimated size is 98.5M TIME SENT SNAPSHOT TIME SENT SNAPSHOT root@192.168.10.179's password: 09:18:21 57.4K zfsrz2/share@a 09:18:22 57.4K zfsrz2/share@a 09:18:23 57.4K zfsrz2/share@a 09:18:24 57.4K zfsrz2/share@a 09:18:25 57.4K zfsrz2/share@a 09:18:26 57.4K zfsrz2/share@a 09:18:27 57.4K zfsrz2/share@a 09:18:28 57.4K zfsrz2/share@a 09:18:29 57.4K zfsrz2/share@a
root@freenas[~]# zfs send -R zfsrz2@a | ssh -i /data/ssh/replication root@192.168.10.179 zfs receive -F zfsrz2 root@192.168.10.179's password: cannot unmount '/var/db/system': Device busy warning: cannot send 'zfsrz2/.system@a': signal received
I will regularly backup my data outside freenas, 4*10T is fine for me, 6 disk adds hot and noise.Raid Z1 is not recommended with drives larger than 2TB.
ssh -i /data/ssh/replication root@192.168.10.17
The authenticity of host '192.168.10.17 (192.168.10.17)' can't be established.
ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)?
zfs send -vv -R zfsrz2@a | ssh -i /data/ssh/replication root@192.168.10.179 zfs receive -vv -F zfsrz2
Just enter the password when prompted then it will ask about the fingerprint. You will need to press Yes to proceed.if I run
ssh -i /data/ssh/replication root@192.168.10.179, it will ask me the password. If I run cmd below, it didn't ask me the password, but the send/receive didn't work(didn't stop and no data was reflected in new pool)
Code:zfs send -vv -R zfsrz2@a | ssh -i /data/ssh/replication root@192.168.10.179 zfs receive -vv -F zfsrz2
you mentioned add it automatically, do you mean I should copy /data/ssh/replication the one in old system to new system?
root@freenas[~]# zfs send -vv -R zfsrz2@a | ssh -i /data/ssh/replication root@192.168.10.179 zfs receive -vv -F zfsrz2
full send of zfsrz2@a estimated size is 12.1K
full send of zfsrz2/share@a estimated size is 12.1K
full send of zfsrz2/.system@a estimated size is 13.1K
full send of zfsrz2/.system/configs-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 12.1K
full send of zfsrz2/.system/rrd-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 97.1M
full send of zfsrz2/.system/syslog-1e6cbdfb415748b98d868947a6e14a88@a estimated size is 123K
full send of zfsrz2/.system/webui@a estimated size is 12.1K
full send of zfsrz2/.system/cores@a estimated size is 12.1K
full send of zfsrz2/.system/samba4@a estimated size is 1.18M
full send of zfsrz2/bak@a estimated size is 12.1K
full send of zfsrz2/pdata@a estimated size is 12.1K
full send of zfsrz2/pdata/seafile@a estimated size is 12.1K
total estimated size is 98.5M
The authenticity of host '192.168.10.179 (192.168.10.179)' can't be established.
ECDSA key fingerprint is SHA256:b7m0xo26eqsIAEnCbw79B/eLjInmlU1DFmg5eAamL3Q.
No matching host key fingerprint found in DNS.
Are you sure you want to continue connecting (yes/no)? TIME SENT SNAPSHOT
TIME SENT SNAPSHOT
09:16:50 57.4K zfsrz2/share@a
09:16:51 57.4K zfsrz2/share@a
09:16:52 57.4K zfsrz2/share@a
root@freenas[~]# ssh -i /data/ssh/replication root@192.168.10.179
root@192.168.10.179's password:
Last login: Tue May 21 09:43:50 2019 from 192.168.10.180
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+9a3c7d8b53f(HEAD): Wed Mar 27 12:41:58 EDT 2019
FreeNAS (c) 2009-2019, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.
For more information, documentation, help or support, go here:
[URL]http://freenas.org[/URL]
Welcome to FreeNAS
Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.
root@freenas[~]#