Is it possible to convert/move/promote a folder in one dataset to a new dataset?

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
Hi I need some help please.
I have a Dataset on my Freenas 11-1-U7 being used for (mainly recording and sharing) my (linux based) Sattelite receivers. The receivers created one directory (movie) inside the dataset where they store all their recordings... In fact over the years it had become a little messy... Used a winbox to organize stuff into subdirs etc... all fine. Now I have succesfully copied that dataset (zfs send and receive with snapshots Thanks to the forum!) to a new dataset (Mediamap) on a new Volume but have a problem with the share... ZFS does not know that there are subdirectories that need to be shared and I cannot get acces from my linux receivers to the above mentioned movie directory that was copied over... According to my Winbox...

So I made a new Dataset movie and now want to copy only the contents of the movie Folder in the dataset Mediamap to the Dataset movie... Without sending everything over the network... Just to share that new movie dataset for the receivers....

Is this doable and/or did I make a mistake in the creation of the share?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You can copy from the CLI using ssh. Data will not go over the network if the datasets are in the same host

cp -R /mnt/source/dataset1 /mnt/target/dataset2
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
@sretalla THANKS!
So that would be in my case..
Code:
cp -R /TBN/movie/MediaMap /TBN//movie


I want all files and dir's in the map movie in the dataset MediaMap on the Mnt TBN to go to the root (//) of the dataset movie on the mount TBN...

Correct?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
// shouldn't be necessary... just one slash.

Be aware that this will be a copy operation, so until you're done and delete the source files, you will have to store double on that TBN pool.
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
oops... Also CLI does not find that folder in the dataset....

Code:
cp: /TBN/movie/MediaMap: no such file or directory


reading man cp now
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
added /mnt before source and destination... seems to be working... looks slow....
 

nasnice

Explorer
Joined
Jul 14, 2014
Messages
82
this was the lucky number:

Code:
cp -R /mnt/TBN/MediaMap/movie/ /mnt/TBN/movie


Thanks for pointing me ... 17 TB will take some time... Any fast way to delete the original map afterwards? or should I do that in the windows box..
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
rm -R /mnt/TBN/MediaMap/movie should do the trick.
 
Top