Can't rclone to locally mounted drive

Hello, new to rclone and finding it rather difficult to learn the syntax. I need to clone a directory AND its files from a local hard drive to an externally mounted drive in linux.

Tried "external" options 2 as an alias for an existing remote and also tried 17 as an external drive (2, alias for an existing remote could be interpreted to mean an external hard drive and 17, local disk could mean the same thing to newbies. So right off the bat I'm a bit perplexed as to which one to use. ). In all cases the external hard drive has already been attached via usb and is identified as /media/me/NameOfExternalDrive. In all cases running rclone listremotes shows "external:" as one of the remotes.

With 17, local disk, I can do:
rclone copy /home/testdirectgory external:

and I get the individual files in the external drive not the actual folder holding the contents.

However, I need the directory and its contents in the external drive. Doing:

rclone copy /home/testdirectory/ external:/testfolder/
creates the individual files in whatever directory I am in when I issue the command.

This looks about right depending on exactly the config of external. Can you paste the results of clone config show external.

I think defining external like this

[external]
type = alias
remote = /media/me/NameOfExternalDrive

then using

rclone copy /home/testdirectory external:testdirectory

should work.

Note that you don't have to define a remote to do a local to local copy so you could just write

rclone copy /home/testdirectory /media/me/NameOfExternalDrive/testdirectory

Thanks! your suggestions worked!

I'm now stuck with trying to tell rclone to only clone those directories and their contents using a text file. The information for filtering (at least I can't find it) do not give an example of this use, or does so using partial examples.

Thank you.

If you have a list of include / exclude patterns then you want --filter-from most likely

https://rclone.org/filtering/#filter-from-read-filtering-patterns-from-a-file

When including a directory use dir/** to match the dir and contents.

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