Restoring From Backed up Snapshot

Status
Not open for further replies.

Raggou

Dabbler
Joined
Feb 22, 2017
Messages
17
So I am moving all the data from a ZPool Media2 -> zPool Media

I ran this command zfs send -Rv Media2@Media2_snap | zfs receive -Fdu Media/Media2Moved

and successfully moved Everything to Media

root@freenas:/mnt/Media/FreeNas/.zfs/snapshot # zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
Media/Media2Moved@Media2_snap 0 - 128K -
Media/Media2Moved/Media2Movies@Media2_snap 0 - 321G -
Media/Media2Moved/Media2TV@Media2_snap 0 - 263G -
Media2@Media2_snap 81.4K - 128K -
Media2/Media2Movies@Media2_snap 1.46M - 321G -
Media2/Media2TV@Media2_snap 500K - 263G -


When I navigate to Media/Media2Moved the folder is empty. How do I actually see that the data transfered properly? Where are the folders?
Sorry for such a basic question
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You probably have a directory mounted on the same path as the dataset and are seeing it instead of the dataset. Unmount it and make sure the dataset is mounted in the right place.
 

Raggou

Dabbler
Joined
Feb 22, 2017
Messages
17
You probably have a directory mounted on the same path as the dataset and are seeing it instead of the dataset. Unmount it and make sure the dataset is mounted in the right place.

I ended up making a clone of the snap and then I could actually see the files, so all in all got everything working :D
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
I ended up making a clone of the snap and then I could actually see the files, so all in all got everything working :D

Just FYI, you will never be able to delete that snapshot without destroying the cloned dataset. If the files in the dataset will experience a lot of change, then this will waste space, as the original zfs blocks will never be freed.
 

Raggou

Dabbler
Joined
Feb 22, 2017
Messages
17
Just FYI, you will never be able to delete that snapshot without destroying the cloned dataset. If the files in the dataset will experience a lot of change, then this will waste space, as the original zfs blocks will never be freed.

Thanks for the warning, so I guess Im confused on how I can move snapshots from one pool to a bigger pool and then use the data from the old pool in the new pool. I hope Im wording this correctly. I thought moving the data through a recent updated snapshot was the correct way to transfer data to a new pool.

You probably have a directory mounted on the same path as the dataset and are seeing it instead of the dataset. Unmount it and make sure the dataset is mounted in the right place.
If I do this in the future is their an easy way to check if I have a directory mounted on the same path as the dataset?
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
Thanks for the warning, so I guess Im confused on how I can move snapshots from one pool to a bigger pool and then use the data from the old pool in the new pool. I hope Im wording this correctly. I thought moving the data through a recent updated snapshot was the correct way to transfer data to a new pool.

You said you made a "clone" from the snapshot - a clone is a real ZFS thing. If this is what you did, my comment applies. If you performed a zfs send/receive then disregard - that is something different.
 

Raggou

Dabbler
Joined
Feb 22, 2017
Messages
17
You said you made a "clone" from the snapshot - a clone is a real ZFS thing. If this is what you did, my comment applies. If you performed a zfs send/receive then disregard - that is something different.

I did a zfs send/receive of the original snapshot but I found It wasn't writable/readable. So one I made a clone of that new snapshot I could read/write data.

So based on what you said. If I delete the snapshot the clone goes away as well?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You can't delete snapshot that a clone depends on.
 
Status
Not open for further replies.
Top