Rclone creates "empty" folders!

I have Rclone run this command every hour with Cron:
rclone move -v --log-file=/home/USER/logs/rclone-m-up-Radarr.txt --delete-empty-src-dirs /home/USER/move/media/movies/movies/radarr/ gdrive:/media/movies/movies/radarr/

....But Rclone creates this folders on the remote drive:

Why is this happening? Some folders are empty som are not.

Those look like temporary directories created by some app. Do you see them on the local directory? I don't think they are anything rclone creates.

They never get deleted and are created exactly every time Rclone process is started.

Check the log file - are they mentioned in the log file?

Transferring:

  • Insidious The Last Key…A 5.1 - KRaLiMaRKo.mkv: 69% /20.284G, 48.866M/s, 2m8s

2020/03/14 07:06:05 INFO :
Transferred: 16.199G / 20.285 GBytes, 80%, 46.114 MBytes/s, ETA 1m30s
Checks: 8 / 9, 89%
Deleted: 4
Transferred: 4 / 5, 80%
Elapsed time: 5m59.7s
Checking:

It says nothing special...

The strange directories are on a gdrive. The look the same on gdrives web interface and on my local computer. Its very strange.

I was wondering did you see any INFO lines with those strange directory names being transferred?

No, thats it. Every line is the same. No other information.

This is from the begining:

2020/03/14 07:00:05 INFO : Google drive root 'media/movies/movies/radarr/
': Waiting for checks to finish
2020/03/14 07:00:05 INFO : Google drive root 'media/movies/movies/radarr/
': Waiting for transfers to finish
2020/03/14 07:00:09 INFO : Insidious The Last Key (2018)/movie.nfo: Copied (new)
2020/03/14 07:00:09 INFO : Insidious The Last Key (2018)/movie.nfo: Deleted
2020/03/14 07:00:10 INFO : Insidious The Last Key (2018)/fanart.jpg: Copied (new)
2020/03/14 07:00:10 INFO : Insidious The Last Key (2018)/fanart.jpg: Deleted
2020/03/14 07:00:10 INFO : Insidious The Last Key (2018)/movie.xml: Copied (new)
2020/03/14 07:00:10 INFO : Insidious The Last Key (2018)/movie.xml: Deleted
2020/03/14 07:00:11 INFO : Insidious The Last Key (2018)/poster.jpg: Copied (new)
2020/03/14 07:00:11 INFO : Insidious The Last Key (2018)/poster.jpg: Deleted
*2020/03/14 07:01:05 INFO : *
Transferred: 2.649G / 20.285 GBytes, 13%, 45.428 MBytes/s, ETA 6m37s
Checks: 8 / 9, 89%
Deleted: 4
Transferred: 4 / 5, 80%
Elapsed time: 59.7s
Checking:

Transferring:

    • Insidious The Last Key…A 5.1 - KRaLiMaRKo.mkv: 13% /20.284G, 48.030M/s, 6m15s*

*2020/03/14 07:02:05 INFO : *
Transferred: 5.532G / 20.285 GBytes, 27%, 47.319 MBytes/s, ETA 5m19s
Checks: 8 / 9, 89%
Deleted: 4
Transferred: 4 / 5, 80%
Elapsed time: 1m59.7s
Checking:

Doesn't this look a lot like that same problem that we had on GoogleCloud where, when creating a folder via the mount we ended up with several duplicates?

I don't know where the ~ character is coming from though, unless that is actually the intentional name of the folder that is being created...

Perhaps I am barking up the wrong tree on this one, but that was the first though that struck me :slight_smile:

@GreenLantern81 Could you share your rclone.config ? (with sensitive info like passwords redacted obviously). I mainly want to see if you are using any additional chained remotes here - like cache or chunker ect.

1 Like

[rclonecopy]
type = drive
client_id = xxxxxxxxxxxxxxxxxxxxxxxgbn0gpo92hri6u1r8sfs2j9.apps.googleusercontent.com
client_secret = xxxxxxxxxxxxxxxxxxxxxxxKpV0
scope = drive
token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1vebr5ycX6QJXO","token_type":"Bearer","refresh_token":"1/Lq34xxxxxxxxxxxxxxxxxxxxxxxvDRjO8XFG_8c","expiry":"20xxxxxxxxxxxxxxxxxxxxxxxZ"}
team_drive = 0AxxxxxxxxxxxxxxxxxxxxxxxVA

Value "client_id" = "55493xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxfs2j9.apps.googleusercontent.com"

If this is the only remote you use, then there is nothing special to think about here.
Using only the Gdrive remote with no extras is the simplest setup and easiest to troubleshoot.

I guess the next step is probably to run a test with a debug-log.
You can add these lines to your config and then run another copy-test:
--log-level DEBUG
This enables the (very verbose) debug output so we can see way more details about what is happening
--log-file rclone_debug_log_weirdnames.txt
If you want to save the log to file instead of to the window on your screen, use this. This example will save the file in the rclone folder, but you can just add a path to somewhere else if you want to specify more.

If the resulting file is too long to reasonably post then use pastebin and give the link for that.

in the first post the name of the remote is gdrive:
and in the last post it is rclonecopy

1 Like

Hmm yes, but if he was just making that syntax mistake accidentally it should give a pretty clear error indicating no such remote exists in config.

But OP should clarify just in case.
In that config "rclonecopy" is just a name-label. It does not produce any spesific function - just in case that wasn't clear.

THANK YOU! That was the solution! One simple / did that mess!
So.... gdrive:, NOT gdrive:/

Thank you everyone else for helping me too!

these damn dirty slashes.
here a forward slash.
there a backward slash.

repeat after me:
i hate slashes
you hate slashes
we all hate slashes

I'm a little confused...
Yes, gdrive: is the root of the remote, and you can use that if you are copying to the remote root
But there is no way around the fact that you need to use a slash in the path if you want to specify a spesific folder.

So how exactly did this solve it for you? Are you now copying directly to the root? Having a slash in the path should not be a problem at all...

Could you share the command you used that worked for you?
I just want to make sure that this is not some bug that should be fixed.

Ha! The problem was not resolved!
I tried to remove the / like this:
rclone move -v --log-file=/home/USER/logs/rclone-m-up-Radarr.txt --delete-empty-src-dirs /home/USER/move/media/movies/movies/radarr/ *gdrive:media/movies/movies/radarr

I ran this command manually. The files got copied to the right path, no strange directories.
BUT, when my Cron task started (every hour) it started to create the maps again. Can the problem be with Cron? I have another Cron job for series and theres no strange folders. That command goes like this:
rclone move -v --log-file=/home/USER/logs/rclone-sbit-tv02-up.txt --delete-empty-src-dirs /home/USER/files/Downloaded/Downloaded/Sbits-TV/ gdrive:/media/unsorted/sbits/ --min-size 250M

My guess is that you have some of those directories somewhere on your system...

What do you get if you do

cd
find . -type d -name "*~*"

that will see if there are any funny names anywhere in your home directory. Replace the . to check other directories.

i ran

in my folder /home/USER/move/media/movies/movies/radarr/ but no result.

Try your whole home directory