Delete-empty-src-dirs don't work on a local mergerfs

What is the problem you are having with rclone?

--delete-empty-src-dirs don't work
all files from a dir are move. the dir is empty but not removed

my local is a mergerfs.

What is your rclone version (output from rclone version)

rclone v1.52.0

  • os/arch: linux/amd64
  • go version: go1.14.3

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Debian 10 / Openmediavault

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

move

Paste command here

/usr/bin/rclone move /srv/xxxxxxxxxx/ gcrypt: --log-file /home/xxxx/rclone/upload.log  -v --delete-empty-src-dirs --fast-list --drive-stop-on-upload-limit --exclude-from /rclone/excludes

The rclone config contents with secrets removed.

[GD]
type = drive
client_id = redacted
client_secret = redacted
scope = drive
token = redacted

[gcrypt]
type = crypt
remote = GD:/crypt
filename_encryption = standard
directory_name_encryption = true
password = redacted
password2 = redacted

A log from the command with the -vv flag

I will put the log with -vv tomorrow because I'm out quota today

What's your mergerfs mount look like?

You should not need quota to test this if you want to do something small.

On a local mount test, I see:

felix@gemini:/local$ mkdir test
felix@gemini:/local$ cd test
felix@gemini:/local/test$ ls
felix@gemini:/local/test$ ls
felix@gemini:/local/test$ mkdir 1
felix@gemini:/local/test$ mkdir 2
felix@gemini:/local/test$ ls
1  2
felix@gemini:/local/test$ rclone move /local/test gcrypt: --delete-empty-src-dirs -vv
2020/06/03 17:59:38 DEBUG : rclone: Version "v1.52.0" starting with parameters ["rclone" "move" "/local/test" "gcrypt:" "--delete-empty-src-dirs" "-vv"]
2020/06/03 17:59:38 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2020/06/03 17:59:39 DEBUG : Encrypted drive 'gcrypt:': Waiting for checks to finish
2020/06/03 17:59:39 DEBUG : Encrypted drive 'gcrypt:': Waiting for transfers to finish
2020/06/03 17:59:39 DEBUG : 2: Removing directory
2020/06/03 17:59:39 DEBUG : 1: Removing directory
2020/06/03 17:59:39 DEBUG : Local file system at /local/test: deleted 2 directories
2020/06/03 17:59:39 INFO  : There was nothing to transfer
2020/06/03 17:59:39 INFO  :
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time:         0.0s

2020/06/03 17:59:39 DEBUG : 6 go routines active

and the 2 directories that were empty are gone.

I just test like you and that work... empty dir deleted

I just test on a directory where last night that don't work and ... that work empty dir deleted

I just test on a directory where last night that don't work and add --fast-list after
--delete-empty-src-dir ... that work empty dir deleted

I just test on a directory where last night that don't work and add --fast-list --drive-stop-on-upload-limit after --delete-empty-src-dir ... that work empty dir deleted

I come back tomorrow with the log of my script..

So everything worked now if I'm reading that right?

If you want to post a log with -vv and if it doesn't work, we can figure it out.

Hello Animosity022;
I'm a newbie :slight_smile:

All work when I write command in my terminal.

I do a chmod +x on the upload script.
when I run my upload script directory aren't remove.
Files are upload on gsuite and delete on source.
The upload is in alphabetical order not as your comment indicates (oldest first)

I just look in my log ( /home/ste/rclone/upload.log) and search for 'directory' no result.

this is my upload script based on your version :
I juste remove the section with RCLONE_USER_AGENT

#!/bin/bash
# RClone Config file
RCLONE_CONFIG=/root/.config/rclone/rclone.conf
export RCLONE_CONFIG
#exit if running
if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then exit; fi

# Move older local files to the cloud
/usr/bin/rclone move /srv/mypath/ gcrypt: --log-file /home/ste/rclone/upload.log -vv --delete-empty-src-dirs --fast-list --drive-stop-on-upload-limit --exclude-from /home/ste/rclone/excludes

You'd need to share a log with -vv on it so we can look at it.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.