Migrating nodes without --delete

This time I lost a lot of time and I’m loosing my nodes. If I understand well I can skip rsync --delete process if I delete all “wal” dbs. Can you confirm?
Files will be removed slowly by GC in the future?

I would still copy the db files after you stopped the node.

1 Like

yes of course. after that can I undelete files and just remove wal dbs?

out of curiosity is the --delete really that much slower than the normal rsync you’d have to do anyway after you shut down the node?

13tb in ext4 without cache. Take days

I hear ya brother. Currently trying to move a nod that has around 5TB of data. had run partial rsyncs before. My node is offline. Running 85 hours so far and I’ve checked 18 million files and transferred another 6 million. Hopefully it’s done soon as I really need to take the whole server down for maintenance but don’t want to go through this again.

btw running rclone seems faster than rsync at checking files. But when just copying, I’m not sure.

i only use the “-delete” when i have previously rsync’ed everything while the node is running, then shutdown the node and use the “-delete”. It takes a while deleting files but much faster than the rsync.

For the rsync i use the --include/–exclude params to run several rsync processes in parallel, rsyncing several groups of folders in each command…

rsync -aP  --include='c**' --include='d**' --include='e**' --include='f**'  --exclude="*" /storj/SN8/storage/blobs/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/ /storj2/SN8/storage/blobs/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/
rsync -aP  --include='g**' --include='h**' --include='i**' --include='j**'  --exclude="*" /storj/SN8/storage/blobs/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/ /storj2/SN8/storage/blobs/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/

We are going off topic I think.
First run rsync with running nodes. Second run with stopped nodes. The question is:
Can I skip third delete phase just deleting only *wel files?

If the second run with stopped node, why do you need third run anyway?

First run - takes a LONG time
Second run - takes a bit less long and updates files that have been added since the first run

Shut down node

Third run (with — delete option) - hopefully takes even less time (as the second run was shorter so fewer files were changed) and deletes files on the destination drive that had since been deleted from the source drive.

1 Like

There will be no write-ahead-log (*.db-wal) files after you stop the node for the last time at it’s old location.
So, make sure your data files are in place at the new location, and just copy the 15 or 16 *.db files over to the new location, prior to 1st start.
it’s just seconds to copy them over, no need for an entire last pass, if that’s all that’s left. N’ yeah if there are any *.db-wal OR *.db-shm files from prev rsync/rclone/robocopy whatever, delete those. Just the lastest/last 16 *.db files. Then start node.

Me thinks, your overthinking it.

1 Like

You may also use rclone, it can do it out of the box.

1 Like

It’s better to run the last rsync with the --delete option when the node is stopped. It should take much less time, than the first two runs. It will update databases and should also remove all removed files to do not wait when the Garbage Collector would remove them, plus, it will fix partially copied databases.
For me - win-win.

If you would like to move nodes quickly - use either dd or analogue or LVM:

or ZFS send/receive.

For Windows there only cloning partition I believe. Which can be done with a Linux GPart from the Live USB stick.

In my setup --delete takes 3/4 days. Again with my question: Can I skip delete after the final run of rsync? What should I do and what should I pay attention to? I simply read that I have to manually delete .db*wel. Is it correct? Can I skip?

PS: I migrated a lot of nodes. I don’t need info how to migrate :rofl:

Preferably - no.
But if you want to experiment - go ahead (please report back, what were corrupted after that).

That was probably meant for me.
Apologies, it was late and I should have read the whole thread better…

1 Like

Umm is that some kinda mistake in the docs? What is a .db*wel?
1/32 of a cent

*wal.
Follow the official guide (linked by Alexey) for migrating a node. This thread is a specific question for a specific needs.

FYI, from the manual:

     --delete                delete extraneous files from dest dirs
     --delete-before         receiver deletes before transfer (default)
     --delete-during         receiver deletes during xfer, not before
     --delete-delay          find deletions during, delete after
     --delete-after          receiver deletes after transfer, not before

The only “version” of delete you should be using must be --delete-during. It starts moving files, compares what needs to be deleted and deletes it as it finds it (=“oh, this file is on the destination but not on the source, so I can get rid of it and move to the next file”).

With --delete (=–delete-before) it first compares the file lists, figures out what to delete, deletes it from the destination, then starts transferring files.

TL;DR: Use --delete-during, it’s faster.

3 Likes