I was doing a rclone copy to my cloud storage, but my PC froze so I need to force restart.
Do I need to worry about data corruption or anything like that?
All I need to do is just start putty again and them execute the command again without worrying about data corruption, uploading duplicated content & etc?
Is there a way to make the process independent of my putty session after started? Like the command will keep running until completion if my SSH session is killed/closed.
apt install tmux
Ok, but are you connecting to some linux vps through ssh, right?
Use a termial multipexer like (assuming your host is on Linux) screen or tmux. The advantage: If your connection is lost, the command runs on and you can even reattach it in a later ssh session. See
https://wiki.ubuntuusers.de/Screen/ for handling screen.
Have a nice day!
Thanks ! I’ll take a look tho…but I’m not a linux expert will try to figure it out
Another popular alternative is “screen”
send it to background with & at end of line.
p.s. Better option to mount would be either crontab script or systemd service.
The machine that I’m uploading doesn’t mount anything. Just upload…
Also how I will know when it ended ? So I should use rclone copy -arguments & ?
Doesn’t the process die if the user logs out even with &? I know if you start a command with setsid it’ll continue running even if logged out.
You need to use:
nohup <command> & to run in the background and avoid the process being killed if your Putty session is closed.
No data corruption will happen. Just run command again and it will ignore duplicates.
What you are looking for is a terminal application called “screen”
Start a new screen and execute rclone there.
Press ctrl-a and then d
It will disconnect you from the screen.
Type screen -r and it will reconnect. This way you will see when it finishes all the stats…
How do I know when it has finished ?
nohup appends output from the command to the file
nohup.out so you can use
tail -f nohup.out from another Putty session to monitor, and as
@ariusbb shows you can use the “screen” command instead and disconnect and reconnect as required.
I noticed rclone move is not deleting some files after moving it even when it says it deleted it on nohup.out…
@ncw ?? Seems to be a bug
You prob need to post your command and a log snipt.