Node not syncing again after clearing content of db/ledger folder

Hi I’ve set up my relay node (Machine1) (once again) according to the guide from CNTOOL Basics - Guild Operators. Everything went well and I was able to sync the node to 100% (Epoch 333, as of 18.04.2022).

After that, on my next machine (Machine2) and I thought of coping the db folder from Machine1 to save time consuming sync process. For that I referred to this post How do I copy the data... | Cardano FAQ.

So I’ve stop the cardano-node on Machine1 and deleted the contents from folder cnode/db/ledger: rm -rf ledger/* and from folder cnode/logs: rm -rf logs/*. After that my Machine1 will not sync when I start the cardano-node. gLive shows Epoch 0 and Status starting for more than 10 hours?

Where is something went wrong here?

Screenshot 2022-04-19 at 09.21.44

Yeah, u will need 3 files in order to start syncing the node

But why u didn’t copied the db from the running node?
To do so u must go (on server where u will copy the file)

sudo systemctl stop cnode
cd /opt/cardano/cnode/db
ls -l

from this location connect to the running node (from where u will copy the db files)

sftp -P xxx user@node_IP

where xxx is the remote node ssh port
user is the remote node ssh user
node_IP is the remote node IP

Now u should see sftp>
type

cd /opt/cardano/cnode/db
ls -l

From here u must download all files, use get (for folders add -R)

get -R ledger
get -R immutable
get -R volatile
get Magic..
etc

It will take ~30-40 min but it will be faster than few days

After u finish the download type exit to disconnect from the running node

PS: if u will want to let the node to sync normally then copy all files except ledger, immutable, volatile folders

and start the node

sudo systemctl start cnode

Cheers,

Hi, Alexd1985
So that means I do not require to stop the cardano-node from my Machine1 (source), I can just copy off it with sftp. And on contrary to the post, I need not empty the db/ledger folder?
Thanks you for your answering, it helped a lot.

The files, folders will be replaced… and u don’t need to stop the node