Bought new disks, any simple way to migrate the pool?

Status
Not open for further replies.

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
How about the very topic of the thread?
 
Last edited:

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Ok I am stuck at point 3 from https://www.truenas.com/community/threads/howto-migrate-data-from-one-pool-to-a-bigger-pool.40519/

What do I actually need to do to migrate the pool to a temp one?
The post implies this is doable from the GUI, but how?
If I enter the commands in the brackets in the shell, I get this:

octopuss@Skladiste:~ $ sudo zfs snapshot -r pool1@migrate
Password:
octopuss@Skladiste:~ $ zfs send -R pool1@migrate | zfs receive pool1-temp
cannot send pool1@migrate: encrypted dataset pool1 may not be sent with properties without the raw flag
warning: cannot send 'pool1@migrate': backup failed
cannot receive: failed to read from stream
octopuss@Skladiste:~ $

edit: I don't even understand if pool1@migrate is some sort of syntax or what. I just copied what the other post said and changed names of the pools.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Screw this, I have no idea what am I doing, I will just create a new pool and copy the files from a a backup I am doing to an external disk right now.
This is way too complicated.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
Screw this, I have no idea what am I doing, I will just create a new pool and copy the files from a a backup I am doing to an external disk right now.
This is way too complicated.
Sometimes it's easier to take the path you are familiar with.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
What should I use to copy files to a backup disk?
I logged into the system through Mobaxterm, lauched the builtin MC and started copying the stuff, and when I woke up, the session was timed out and only a few files were copied, I guess because my PC went to sleep?
Is there something that is guaranteed to work?
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
rsync?
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Could you be more specific please?
I did a google search and my brain is dizzy. Damn Linux command line.
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
Could you be more specific please?
I did a google search and my brain is dizzy. Damn Linux command line.
something like this:

Code:
rsync --archive --verbose --human-readable  root@172.20.0.2:/mnt/tank/src   /mnt/tank/dst/


This will pull from another truenas server and put on the current one.
The trailing slashes matter and can be the difference between an extra subfolder creation. So verify this.

Note: the command is running on the foreground. So if you expect it to take a long time be sure to use tmux or screen to run it in a virtual session.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
So I guess I can just do rsync /mnt/pool1 /mnt/pool1-temp if I'm just moving files between pools on the same system?

And if I use tmux - if I understand what I googled up correctly - will I be able to see the progress if I log back into the machine via SSH?
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
So I guess I can just do rsync /mnt/pool1 /mnt/pool1-temp if I'm just moving files between pools on the same system?
yes, but it only copies. It does not "move" the files. Try the dry run to verify if the directory structure is like expected.

And if I use tmux - if I understand what I googled up correctly - will I be able to see the progress if I log back into the machine via SSH?
Run tmux -> run the command. You do not have a prompt because the program is still running.
CTRL-b -> d.

But what i prefer is
Code:
rsync <your params> |  tee -a rysnc.log


Now it will write the output to a file so i can follow the output without re-entering the tmux-session.
(Because if you re-enter the real session and you press the wrong keys you can kill the action).

 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Nice.
The new attempt at copying the stuff with MC is still in progress and if it fails again for whatever reason, I will try this.
But it should be the same copy operation, right? Or does rsync do anything differently?
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
to be honest i did not follow this thread. You started with zfs replication. That is copying at the block level afaik. With rsync you are copying at file(system) level.

Also note that rsync also copies metadata (the datestamps, ownership, chmod-rights). That is the "archive" flag. This may or may not important to you.
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
There's no need for the command line. You can set up replication from the GUI (Tasks> Replication Tasks), for a one-time job as well as for scheduled back-ups.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Really? You can specify it to run only once?
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
yes
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Couldn't figure out how, but I can always delete the task once the backup is finished.
The damn copy from MC got messed up again, so 3rd time copying 3TB of data... yay.
I guess this works for just getting the files and folders backed up:
1672503079116.png
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Just don't tick anything under schedule and run it manually.
 
Status
Not open for further replies.
Top