i have used rclone several times to sync from Windows to Linux, Windows to B2, Linux to B2
now i'd like to sync from a Linux Mint machine to a Raspbian machine on my home local network but it is not clear how to specify the target/remote folder
the remote Raspbian machine has a working Samba share
sudo rclone copy /home/teamtom/source_folder //raspi4/nas/target_folder
it doesn't give any error but nothing is copied
sorry for the newbie question
can somebody enlighten me, please?
Using a samba server is a good idea as it is both considered the overall best option, and also will allow cross-compatibility with your windows systems.
the syntax for rclone should be just the same as any other copy operation to that server, so I kind of suspect this is a server configuration issue rather than an rclone problem.
Have you verified that you can copy to the server normally? (like in the desktop GUI, or from a simple copy command in the terminal).
Also, what user account is rclone running as? If you launch it as a system service or something of that nature then you might be using another user-account then your own personal one - and if that is the case you need to make sure that this account also has write permissions to the server.
Finally - if you want to see if you can get some more spesific info out of rclone then try adding these two flags to your copy command before you run it:
Then you can share this file with us for analysis (it will contain a lot more info than normal output and thus hopefully show the underlying problem). You may need to post it on pastebin.com if it is very long. Some names of files and folders may be exposed in the log, but otherwise there should be little security risk associated with sharing the log. If you don't want to share it publicly you can alternatively PM me, but then you might miss out on responses from others who want to try to help you.
thank you for the quick answer!
actually i am totally confused how to reference the remote linux system from a terminal when copiing to it
i am mostly a Windows user, but i have a basic level of understanding how to ssh, use rsync
should i create a remote in rclone config?
should i mount the remote folder?
again: sorry for the newbie linux question, but how to reference a remote linux system from linux terminal when copiing to it?
I'm also a window-primary guy with limited Linux skills, but assuming that you already have a samba server up and running then it should be just as you indicated:
This structure is AFAIK the same as windows except for the difference in \ and / in paths
nothing special needs to be done for rclone to use this path as a source or destination. It can interpret local filesystems natively. (you COULD set up a "local filesystem" remote but that is totally optional and something you only need if you want to set special options for how to handle links and such).
The first thing you need to make sure is that the samba server is
(A) working at all - ie. try coping some stuff in the desktop GUI for a start...
and (B) has the right access permissions (and not just for your own user, but also whatever user rclone runs under) - so check the samba config and test that directly. You don't need to involve rclone at all in this first step of testing, so if you have problems you know it's a problem with the samba share (or permissions) you need to look at.
Not needed, as described above. Not unless you special options.
Not needed. If you wanted to mount the network drive you can for your convenience, but it's not required. Also you don't have to mount this in rclone. It would make more sense to mount it directly in Linux at the OS level. There is nothing here rclone needs to translate or emulate on a normal samba share after all - it is not a cloud drive.
Does this give you some ideas to get started?
i tried with //raspi4/NAS/target_folder as remote but rclone copied the files to the root of the same machine
as if i used /raspi4/NAS/target_folder as target
That's likely just a syntax error - it is not identifying that path as a network path apaprently. Probably I am just not experienced enough to identify the problem. According to:
may be the correct format. I can't say I have seen that way to write it before, but it's worth a shot. Perhaps smb: is normally just omitted and auto-detected when accessed via GUI.
But why are you involving rclone to do a test when you don't need to? You are only making things harder for yourself than they have to be.
Please - use either the linux terminal cp command
or simply open up the address in the desktop GUI on Linux
and first and foremost check that the samba sever works as expected.
Then you can start worrying about how to make rclone work with it. There is no reason to stack problems on top of eachother, unless you are masochistic
i could list the remote Samba shared folder in GUI with smb://raspi4/NAS/target_folder after specifying the password also i could copy files to the remote folder
could the password be the problem? that the samba share is password protected?
if so is there a way for rclone to pass username/password to authenticate Samba?
when tried the same smb://raspi4/NAS/target_folder with rclone in terminal in DEBUG mode it responded:
Failed to create file system for "smb://raspi4/NAS/target_folder": didn't find section in config file
That means it is interpreting smb: as "an rclone remote called smb".
I didn't think that a local-type remote was needed for this - but I guess you can try setting one up for it. It certainly wouldn't hurt at least.
@Animosity022 My lack of day-to-day Linux experience is showing here, want to comment on this? I suspect samba shares are very familiar to you.
But yes, that the share is "passworded" is probably an issue. I assume this means that your user does not by default have access permission and you need to manually type in an authorization - which obviously rclone can't do or know about. The share should be configured to allow access directly to the spesific user, and in rclone's case it needs to be the spesific user account rclone runs under (which may or may not be the same as the one you use, depending on how you launch rclone).
So yea, this sounds like a problem you need to fix. To verify you might just want to temporarily disable the authentication and just see if that suddenly makes everything work as expected. If so then you know what the problem is.
Is there a reason you are using rclone for this?
Have you considered using rsync (upon which rclone is based) instead?
I don't think rclone is actually built on rsync despite what the name might imply. It's more like the basic inspiration for it. Aside from that they both sync data they aren't really very similar at all, and I don't believe they share any code.
But yes, in this case where no cloud-drives are involved on either side, rsync could be used too - or any other syncing tool.
On the other hand, rclone does a fine job as a general sync or copier tool also. I use it a lot for these purposes locally since it's stable and flexible due to it's options, filtering ect.
I think what software that performs the copy/sync isn't so relevant to this spesific issue since this doesn't really seem to be an rclone problem but more of a general Linux and Samba thing. Lots of other tools could be used here, but if they work rclone should too.
I'm not sure where I got the impression that rclone had origins in rsync. Although given that rclone is written in Go... uh... yeah I guess not?
Anyway, if OP wants to specifically use rclone, I would recommend sftp instead of samba.
Google "[distro] configure sftp server" there are plenty of tutorials. Samba sounds like a whole mess of unnecessary goop for this particular use case.
That's true. Using rclone you aren't bound to a "normal" network share like samba at all. You can use a bunch of different standard servers, and some of them like sftp are probably more straight-forward if you only really need to move files around.
Do you know what tends to be best performance-wise? samba should be fast, but I suspect sftp would also be quite fast.
My guess would be FTP, but that's just my gut.
There are some very lightweight FTP servers, and it wouldn't have the encryption overhead associated with SSH (although that's obviously hardware dependent).
rclone worked excellent for me in cases like syncing from Windows to Linux, Windows to Backblaze B2, Linux to B2
i thought it works just fine from Linux to Linux
i realized my mistake when tried to specify the target Linux machine
i guess i will also try rsync
It does. The problem you have here is not an rclone restriction. It's a Linux/samba setup issue.
I expect rclone (or any other software) is going to be running into the same problems.
Hi...I saw that the bandwidth was quite low, however the files actually got moved very quickly. I suppose this is because before transferring data over the wire, BTSync is packing all the piles of files into its 4Meg unique segments? So then it only needs to transfer unique blocks of data.
Is that remotely close? Cause if not, there is some mystical un-monitored network bandwidth. It was showing very small amounts and not even consistently, but it manages to push a lot of data to the other side in a short time.