Combine filter-from and backup-dir

What is the problem you are having with rclone?

I am testing this:

  1. Directories dir1 (source) and dir2 (remote) have the same content
  2. I move the file dir1/data/document.pdf to dir1/system/document.pdf
  3. I want to sync again dir1 and dir2, so:
    3.1. I want rclone to copy dir1/system/document.pdf to dir2/system/document
    3.2. I want rclone to copy dir1/data/document.pdf to frass/
    3.3. I want rclone to delete dir2/data/document.pdf

But using --filter-from and --backup-dir, the document.pdf is copid, but the 3.2 and 3.3 steps never happens

What is your rclone version (output from rclone version)

rclone v1.56.0

  • os/version: debian bullseye/sid (64 bit)
  • os/kernel: 5.10.0-8-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.5
  • go/linking: static
  • go/tags: none

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

Local crypt

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

rclone sync /dir1 /dir2 --include-from listfiles.txt --backup-dir=frass  --log-file=logfile.log -v -P

Is this happening because is not possible to use both flags? Any idea to combine both?
Thanks!
Alex.

This doesn't make sense. You already moved dir1/data/document.pdf so how is it supposed to do this?

Step 3.3 should be happening (unless you are tracking renames in which case, the same as step 2 should happen. Where are the -vv logs requested by the template? They are requested for a reason and you removed that prompt.

Also, I am pretty sure you can't have a --backup-dir that overlaps your dest dir though I am not sure this is the case here. It is really hard to tell without the -vv log. Especially since /dir1 and /dir2 are absolute paths.

Thanks!
Have sense, because I didn't move the file still (the sync option only copy it). And yes, I think 3.2. and 3.3. are happening at the same time.
My command is only a sample. Of course, my --backup-dir doesn't overlap my destination, but I wanted to simplified the example. The point is, when I don't use the --include-from flag, the actions 3.1, 3.2 and 3.3 always occurs.
Alex.

Can you share a debug log...

¡Of course! This is the complete command and log :slight_smile:

rclone sync /media/kat/Empresa LocalBackup:EmpresaCyLocal --include-from /home/user/text0.txt -vv
2021/09/15 16:22:36 DEBUG : rclone: Version "v1.56.0" starting with parameters ["rclone" "sync" "/media/kat/Empresa" "LocalBackup:EmpresaCyLocal" "--include-from" "/home/user/text0.txt" "-vv"]
2021/09/15 16:22:36 DEBUG : Creating backend with remote "/media/kat/Empresa"
2021/09/15 16:22:36 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2021/09/15 16:22:36 DEBUG : Creating backend with remote "LocalBackup:EmpresaCyLocal"
2021/09/15 16:22:36 DEBUG : Creating backend with remote "/media/localbackup/LocalBackup/6c9s7senano8ji2o6ovnljka1c"
2021/09/15 16:22:36 DEBUG : Comp1_SL: Excluded
2021/09/15 16:22:36 DEBUG : Comp2: Excluded
2021/09/15 16:22:36 DEBUG : Comp2: Excluded
2021/09/15 16:22:36 DEBUG : Comp1_SL: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/TodoNS: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/owncloud: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/.ts: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/TodoNS: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/owncloud: Excluded
2021/09/15 16:22:36 DEBUG : Comp3/.ts: Excluded
2021/09/15 16:22:36 DEBUG : Encrypted drive 'LocalBackup:EmpresaCyLocal': Waiting for checks to finish
2021/09/15 16:22:36 DEBUG : Encrypted drive 'LocalBackup:EmpresaCyLocal': Waiting for transfers to finish
2021/09/15 16:22:36 DEBUG : /cabina.txt: md5 = 6c60e13f079ff15ad9b78d49422955c3 OK
2021/09/15 16:22:36 INFO : Comp3/cabina.txt: Copied (new)
2021/09/15 16:22:36 DEBUG : Comp3/diagram.pdf: md5 = 87ede8900598a84e1dbea206f6a606aa OK
2021/09/15 16:22:36 INFO : Comp3/diagram.pdf: Copied (new)
2021/09/15 16:22:36 DEBUG : Waiting for deletions to finish
2021/09/15 16:22:36 INFO :
Transferred: 136.859Ki / 136.859 KiByte, 100%, 0 Byte/s, ETA -
Transferred: 2 / 2, 100%
Elapsed time: 0.1s

2021/09/15 16:22:36 DEBUG : 4 go routines active

The content fo the text0.txt file is:
Comp3/cabina.txt
Comp3/diagram.pdf

Please get your story straight. In the title you say you are trying to use --filter-from and --backup-dir but the "complete command" you posted just uses --include-from.

Also it still doesn't make sense:

There is no dir1/data/document.pdf since you moved it to dir1/system/document.pdf

Best of luck. I am done

your initial issue and that debug log do not match.

i am not understanding what issue you are having with rclone.

can you describe in detail what the issue is?

please, do not use dir1 and dir2, that do not exist.
use that debug as the basis of our conversation.

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