How can I make sure that rclone has synced everything before shutting down bwpup.
I think I'm having problems with a database because I often have to restore the dropbox file due to corruption. I'm thinking this is being caused because when I finish working on it I'm tired and ready for bed so I close and save my work and then shut down the computer. Currently I'll try watching the Up:k/s and when it flat lines Ill shutdown.
I wonder if there is a better way?
How to ensure rclone sync before shut down?
Moderator: Forum moderators
How to ensure rclone sync before shut down?
Reason: Made the original subject line into a question
BWPUP 10.0.9 on persistent USB
- Trapster
- Posts: 207
- Joined: Sat Aug 01, 2020 7:44 pm
- Location: Texas
- Has thanked: 1 time
- Been thanked: 63 times
Re: How to ensure rclone sync before shut down?
I don't have rclone but if you're running it in a script, you can always add this to the end of the script:
Code: Select all
xmessage -center "sync is complete"
- wizard
- Posts: 2128
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2903 times
- Been thanked: 778 times
Re: How to ensure rclone sync before shut down?
Maybe just a little script that runs rclone, then shuts the system down an hour later.
wizard
Big pile of OLD computers
-
- Posts: 7
- Joined: Thu Jun 13, 2024 5:23 pm
Re: How to ensure rclone sync before shut down?
You can ensure rclone finishes syncing before shutdown by using a simple shutdown script. Create a script that runs rclone sync and only shuts down once syncing is complete.
1. Create the script:
Open a terminal and run:
Code: Select all
echo -e "#!/bin/sh\nrclone sync /path/to/local/dir remote:backup && poweroff" > /root/safe_shutdown.sh
chmod +x /root/safe_shutdown.sh
2. Use the script to shut down:
Instead of shutting down manually, run:
Code: Select all
/root/safe_shutdown.sh
This ensures that rclone fully syncs your files before the system powers off.