Title: MyNode + Raspberry Pi 4 how to pause initial sync Post by: apogio on May 17, 2023, 07:11:52 PM Hello! finally, after waiting a long time to get my hands on a cheap raspberry pi, I have managed to buy one. I am so happy right now!
I have started the initial syncing process, but I want to pause it and restart tomorrow, because I know there will be a 2hrs electricity break for maintenance during the night. Is it possible to turn it off and start tomorrow from where I left it? I don't want to ruin my progress so far. I also haven't been able to find a similar topic on the web. Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: LoyceV on May 17, 2023, 08:57:35 PM It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way.
Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: apogio on May 17, 2023, 09:44:50 PM It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way. When using bitcoin core, I can just close it. However here, it seems like it's running multiple processes and that's why I am worried. So you suggest just turning it off using the power button on the cable? Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: LoyceV on May 18, 2023, 07:57:18 AM It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way. When using bitcoin core, I can just close it. However here, it seems like it's running multiple processes and that's why I am worried. Code: ps aux | grep bitcoind Code: kill 804968 Quote So you suggest just turning it off using the power button on the cable? No! That's not graceful at all.Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: nc50lc on May 18, 2023, 12:06:28 PM I don't want to ruin my progress so far. I also haven't been able to find a similar topic on the web. There's also a "stop" rpc command that you can use with bitcoin-cli to stop bitcoind.Use it like any other RPC commands, e.g.: bitcoin-cli stop Just make sure that you'll call it with bitcoin-cli since it wont work with bitcoind like in the very old versions. Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: apogio on May 18, 2023, 03:12:48 PM I do this: Code: ps aux | grep bitcoind Code: kill 804968 Quote So you suggest just turning it off using the power button on the cable? No! That's not graceful at all.I briefly read myDocs guide and found out there's script to stop Bitcoin and other services[1]. I don't know if the guide is up to date though. Code: # Stop Bitcoin and other services [1] https://mynodebtc.github.io/bitcoin/data-from-other-node.html (https://mynodebtc.github.io/bitcoin/data-from-other-node.html) There's also a "stop" rpc command that you can use with bitcoin-cli to stop bitcoind. Use it like any other RPC commands, e.g.: bitcoin-cli stop Just make sure that you'll call it with bitcoin-cli since it wont work with bitcoind like in the very old versions. Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain sync Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: nc50lc on May 19, 2023, 09:40:29 AM -snip- Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain syncPerhaps the issue is not having access to multiple terminals or something else? Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: LoyceV on May 19, 2023, 09:43:58 AM I don't have a terminal since I am on the initial blockchain sync Can you explain this? Even when running Linux without GUI, you have 6 terminals by default (CTRL-ALT-F1-6). Or just CTRL-Z or CTRL-C your sync.I'm saying this based on generic Linux usage, I've never touched a "MyNode". Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: ABCbits on May 19, 2023, 09:44:11 AM --snip-- Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain sync Last time i tried myNode on Virtual Machine i can access OS desktop and terminal easily. Anyway, myNode also provide guide to access terminal anytime you want. Check https://mynodebtc.github.io/advanced/linux-terminal.html (https://mynodebtc.github.io/advanced/linux-terminal.html). Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: apogio on May 19, 2023, 10:17:58 AM Can you explain this? Even when running Linux without GUI, you have 6 terminals by default (CTRL-ALT-F1-6). Or just CTRL-Z or CTRL-C your sync. I'm saying this based on generic Linux usage, I've never touched a "MyNode". Actually when syncing the initial blockchain using MyNode, there is no option to use a terminal. Please though check my following answer to @ETFBitcoin, because it seems like I am wrong. Last time i tried myNode on Virtual Machine i can access OS desktop and terminal easily. Anyway, myNode also provide guide to access terminal anytime you want. Check https://mynodebtc.github.io/advanced/linux-terminal.html (https://mynodebtc.github.io/advanced/linux-terminal.html). This is exactly what I needed. Unfortunately I get an error opening this tab, but I guess I will figure out why! Thanks! Title: Re: MyNode + Raspberry Pi 4 how to pause initial sync Post by: Carlton Banks on May 21, 2023, 10:54:03 PM Then: Code: kill 804968 hmmm, one ought to be careful doing that. these node-in-a-box systems could have a bitcoin service that's configured to recognize when bitcoind dies and restart it ASAP. the user might see the bitcoind process successfully go down, confidently sends poweroff, and meanwhile bitcoind is restarting (or even fully started) before the machine completes poweroff. bitcoin is more resilient to being unexpectedly killed than it used to be, but there are still no guarantees against corrupted data (which means resyncing the whole chain in the worst case). although I'm not sure what linux does to kill processes on poweroff, if it's standard kill [pid] (as you've written above) then it would actually do the right thing and wait for bitcoind to finish correctly before poweroff completes (kill sends SIGTERM by default, which is at least one of the signals bitcoind catches to do an orderly shutdown) so check what the OS actually does, and preferably use the in-house command for shutting bitcoind down before poweroff and yes, definitely never just turn the computer off at the wall, you're asking for problems that way |