Adding extension to partial file

I searched all around the doc, github and here and can’t find anything.

I sync back to my home server, the file from a sftp. Its working great but the folder on my home server is analyzed by radarr and sonarr, they take the file during the file transfer.

How could I add a extention to the file being transfered ? like filename.txt.partial ?
If you have another idea I’m open.



Can you mount the SFTP and just use regular rsync? That might be a better fit.

I can’t.
Well I can but since I don’t have access physically to the ssh server and I don’t have a key (yes I know…). I can only mount with a password.
But if for a reason or another, the connection is lost between the home server and the ssh server, it can’t reconnect without me physically typing the password.

and if I use a mounted sshfs (or davfs) I expose myself to loose local content if the sync is launched when this is unmounted (since the folder will be empty).

If you can run rclone sync against the remote, you should be able to mount it:

felix@gemini:~$ rclone lsd TestSFTP:
          -1 2018-07-23 21:00:25        -1 .aspnet
          -1 2018-07-30 21:34:06        -1 .cache
          -1 2018-07-23 16:56:54        -1 .config
          -1 2018-07-29 08:59:22        -1 .homebridge
          -1 2018-07-25 09:27:49        -1 .local
          -1 2018-07-23 21:20:04        -1 .mono
          -1 2018-07-30 21:52:26        -1 .plexdrive
          -1 2018-07-25 09:28:02        -1 .pyroscope
          -1 2018-07-31 20:26:37        -1 .ssh
          -1 2018-07-25 09:28:02        -1 bin
          -1 2018-07-30 21:49:47        -1 go
          -1 2018-07-30 21:34:05        -1 logs
          -1 2018-07-30 21:49:14        -1 pkg
          -1 2018-08-01 07:51:23        -1 scripts
          -1 2018-08-01 07:39:54        -1 src
felix@gemini:~$ mkdir Test
felix@gemini:~$ rclone mount TestSFTP: /home/felix/Test

felix@gemini:~/Test$ ls
bin  go  logs  mdns.pcap  pkg  scripts  src  Test  test1.pcap  test.pcap

If you can mount it, you can run rsync against the mount point. The script could mount and unmount it if that was the need.

I precise another thing because I juste tested rsync, after searching.
rsync need ssh acces which I don’t (and I did’nt precise it earlier, sorry for that).

I can rsync a mounted drive (using sshfs), rsync will not start if it does not found source directory so its ok but copyping large file with rsync throught sshfs (or davfs2) seem very not adequate.

rclone is working very well for my need, the only issue I have is the not completed file not having extension or hidden.

Does the cache option could help me ?

I think you are missing my steps.

You’d mount the remote you already have setup via:

rclone mount yourmount: /somedirectory

You’d use rsync as if it’s local. No other connection/anything is needed:

rsync -vaz /somedirectory/ /localdirectory/

and it would use the mount and create proper files.

There isn’t a way to do this at the moment, but it is a good idea. Can you please make a new issue on github with this in - thanks.