What happens if my putty session is killed while doing a rclone copy/move/sync?

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.

use
apt install tmux
tmux

1 Like

What is that?

Putty is Windows…

Ok, but are you connecting to some linux vps through ssh, right?

yeah…so ???

http://man.openbsd.org/OpenBSD-current/man1/tmux.1

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…

Thanks.

How do I know when it has finished ?

By default 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.

1 Like

Thanks :slight_smile:

I noticed rclone move is not deleting some files after moving it even when it says it deleted it on nohup.out…

Any ideias @ncw ?? Seems to be a bug

You prob need to post your command and a log snipt.