Moving zfs pools
update: apparently the command structure for filesystem backup was not stable in build 27. They have since changed to send and recv so if you are using a newer version of Solaris express or Solaris update2 or beyond. replace with the new commands as needed.
A question came up how to move a zfs data from one pool to another, I know zfs has backup and restore commands, but didn’t know how they work, so I decided to find out. Here is how I did the move.
So here are the basics. Take a snapshot of filesystem to move.
#zfs snapshot data/test1@backup
To move the you execute
#zfs backup data/test1@backup | zfs restore newpool/newfilesystem
You move all the data in the snapshot and pipe it to the new pool that restores it in the new filesystem. The pool can be on another box across the network with either netcat or ssh in the middle. If you are going across the net I would compress it using bzip or gzip but I will leave all those details to users.
A question came up how to move a zfs data from one pool to another, I know zfs has backup and restore commands, but didn’t know how they work, so I decided to find out. Here is how I did the move.
So here are the basics. Take a snapshot of filesystem to move.
#zfs snapshot data/test1@backup
To move the you execute
#zfs backup data/test1@backup | zfs restore newpool/newfilesystem
You move all the data in the snapshot and pipe it to the new pool that restores it in the new filesystem. The pool can be on another box across the network with either netcat or ssh in the middle. If you are going across the net I would compress it using bzip or gzip but I will leave all those details to users.











0 Comments:
Post a Comment
<< Home