How to use --backup-dir target:backup-old

What is the problem you are having with rclone?

I can't use this cmd I don't understand how to use it?
--backup-dir remote:old

Run the 'rclone version' command and share the full output of the command.

rclone-v1.59.1-freebsd-amd64.zip

Which cloud storage system do you use? (e.g. Google Drive)

Google Drive

The command you are trying to run (e.g. rclone copy /tmp remote:tmp)

Paste the command here

rclone copy --dry-run /mnt/volume1 ppvSDrive0:backup_truenas --backup-dir target:backup-old

The contents of the rclone configuration with secrets removed.

Paste the configuration here

A log of the command with the -vv flag

Paste the newspaper here

2022/08/23 17:33:01 DEBUG: rclone: ​​Version "v1.53.1-DEV" starting with parameters ["rclone" "copy" "--dry-run" "/mnt/volume1" "ppvSDrive0:backup_truenas" "--backup-dir" "target:backup-old" "-vv"]
2022/08/23 17:33:01 DEBUG: Creating backend with remote "/mnt/volume1"
2022/08/23 17:33:01 DEBUG: Using config file from "/root/.config/rclone/rclone.conf"
2022/08/23 17:33:01 DEBUG: Creating backend with remote "ppvSDrive0:backup_truenas"
2022/08/23 17:33:01 DEBUG: Creating backend with remote "target:backup-old"
2022/08/23 17:33:01 ERROR: Fatal error received - not attempting retries
2022/08/23 17:33:01 INFO:
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (fatal error encountered)
Elapsed time: 0.4s

2022/08/23 17:33:01 DEBUG: 4 go routines active
2022/08/23 17:33:01 Failed to copy: Failed to make fs for --backup-dir "target:backup-old": didn't find section in config file

hi,
that is a very old version of rclone.

the backup dir must be a subdir of the dest, for example, from the docs.
rclone sync -i /path/to/local remote:current --backup-dir remote:old

Thanks for your reply asdffdsa,
Yes it's an old version that works well but I don't know why all my attempts to update have failed. Finally I found how to do it, I had to be not root but user:
admin@truenas:~$rclone version
rclone v1.59.1

  • os/version: freebsd 12.2-release-p14 (64 bit)
  • os/kernel: 12.2-release-p14 (amd64)
  • os/type: freebsd
  • os/arch: amd64
  • go/version: go1.18.5
  • go/linking: static
  • go/tags: none
    To return to flags --backup-dir remote:old
    If I understood correctly, I must create in the destination in my "Google drive" a subdirectory named "backup"?
    I'm really sorry for the understanding! But I'm translating the English text into French with google and I'm afraid the translation won't be perfect :slight_smile:
    Thanks for your help Richard :slight_smile:

rclone will create the subdir.

Without the copy ok flags:



root@truenas[/mnt/volume1/USERS/admin]# rclone copy --dry-run /mnt/volume1/USERS/admin/#My-Models-Docs ppvSDrive0:backup_truenas
2022/08/25 12:53:29 NOTICE:
Transferred: 11.277 MiB / 11.277 MiB, 100%, 0 B/s, ETA -
Transferred: 102 / 102, 100%
Elapsed time: 0.8s

Here is the error message from rclone with the flags:
root@truenas[/mnt/volume1/USERS/admin]# rclone copy --dry-run /mnt/volume1/USERS/admin/#My-Models-Docs ppvSDrive0:backup_truenas --backup-dir remote:old
2022/08/25 12:50:12 ERROR: Fatal error received - not attempting retries
2022/08/25 12:50:12 NOTICE:
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (fatal error encountered)
Elapsed time: 0.4s

2022/08/25 12:50:12 Failed to copy: failed to make fs for --backup-dir "remote:old": didn't find section in config file

Thanks for your help Richard

[Resolved]
For beginners who want to know how to use flags (--backup-dir remote:old)
1.Important! In the CLI log in as root
2. Example: I create the "backup and old" reps at the root of my remote drive "/backup/old"
I run these two cmds:
rclone mkdir [name of my remote]:backup
rclone mkdir [name of my remote]:backup/old
3. Once these two directories are created my remote is ready to run rclone
4. I can check the presence of the addresses by connecting to [My remote drive]
5. Example cmd:
I test my cmd with the "--dry-run" flag if no error!
rclone sync --dry-run /mnt/volume1/PUBLIC [name of my remote]:[destination dir] --backup-dir [name of my remote]:backup/old

I run my cmd with the "--progress" flag to get progress info:
rclone sync --progress /mnt/volume1/PUBLIC [name of my remote]:[Destination dir] --backup-dir [name of my remote]:backup/old

Thank you for all the people who help us in this forum and a big thank you to the developers of this awesome rclone :slight_smile:
See you soon Richard

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