Linux - FFS changes long folder name on cifs drive

Get help for specific problems
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

I'm backing up to an NTFS formatted remote drive connected via cifs. When backing up a long local folder name FFS changes the name on the remote cifs drive. An example is....
local folder name is 'BPM Pro v1.3 pre mirror flip', FFS changed this to 'BIU7WR~0' on the remote cifs drive with.
I can use FFS to backup the same folder to a local ntfs drive and the folder name is preserved.
I can use Nemo to copy the local folder to the remote cifs drive and the folder name is preserved.

I can only assume that FFS has a problem with the remote cifs drive. Might there be a way to preserve the folder name on the cifs drive ??

LeoW

Have you tried SFTPFS?

SFTPFS is a FUSE filesystem that provides access to an SFTP server as a local filesystem. This means that you can access files on an SFTP server as if they were located on your local machine. SFTPFS is a great way to access files on remote servers without having to use a separate SSH client.

To use SFTPFS, you need to have the SFTPFS binary installed. You can install SFTPFS on most Linux distributions using your package manager. Once you have installed SFTPFS, you can mount an SFTP server as a local filesystem by running the following command:

sftpfs myuser@myserver:/home/myuser .


Try syncting over FUSE, it might work better for you. Not sure.

If I have time I will test it out and see if it preserves long file names with spaces in them.

You can also install SSH Server on Linux And see if that preserves the file names.
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

Thanks for the reply LeoW. SFTPFS is not available in the Linux Mint 21.1 package manager.
Being as it's only one folder I'll just have to make sure that the name of any folders I want backing up aren't too long and don't have too many spaces.

LeoW

Sorry,

I made a big typo:

the package in Mint is sshfs

First you load ssh server, then sshfs

from the remote linux machine you type:

The syntax for mounting a remote file system over sshfs is as follows:

sshfs [options] <username>@<hostname>:<path> <local_mount_point>

Here is a description of each of the options:

options: This is a list of options that can be used to configure the mount. Some common options include -o allow_other to allow other users to access the mount, and -o default_permissions to use the default permissions for the files on the mount.
username: This is the username of the account on the remote computer.
hostname: This is the hostname or IP address of the remote computer.
path: This is the path to the directory on the remote computer that you want to mount.
local_mount_point: This is the path to the directory on your local machine where you want to mount the remote directory.
For example, to mount the /home/myuser directory on the remote computer myserver as the ~/myserver directory on your local machine, you would use the following command:

sshfs -o allow_other myuser@myserver:/home/myuser ~/myserver


Let me know how this works for you.

Sorry for wasting your time with the wrong filename.
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

I'll take a look at that then. The only problem may be what the remote drive is plugged in to, it's a TP-Link modem router that has two usb ports, but it only uses cifs 1.0. I'll try and find some time to see if sshfs wants to play nicely with it.
No need for apologies, we all make mistakes.

LeoW

cifs Unfortunately is a slow protocol. Slower transfer speeds than you'll get with smb 3.0.

Does your router support FTP (possibly with encryption)? It might be a little better than cifs.

depending on how old your router is it might be time for an upgrade to one that supports WiFi 6 and WiFi 6 on your other devices because I get good transfer speeds using my new router that supports SMB 3.0. About the same or better than using S F T P to a Linux machine.

The basic fact is that you're never going to get extremely fast speed going to a simple router hard drive. presuming that your router is old enough that it can't do smb 3.0 it probably has low memory and a slow processor. Do you know what level usb port you have on the back of your router? I'm going to take an educated guess and say that its usb 2.0 and not 3.0 if your router is too old to support SMB 3.

If you can Get a router with a usb 3.0 port and smb 3.0 you'll be better off.

How fast is the hard drive you have attached spinning dr flash drive or SSD?
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

The USB on the router is actually 3.0. The drive is an SSD. I only use it for storage and as a media server for the TV, and in that respect it's fast enough. I'd love to upgrade it, but getting that past the financial department could be tricky lol !!

LeoW

How do you know the router is only using cifs and not smb 2 or 3?

cifs is slower than smb 3.0.

I was able To use and test FTP with TLS encryption and the performance was a bit slower than smb3 but perhaps not as bad as cifs.

Your router may not support sftp but ftp can act as a comparison test.

CIFS, According to my searching does support file names with spaces in them. Do file copies from your computer to the hard drive work in Explorer from Windows or Linux with spaces in them? Is the problem only happening inside the sync software?
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

Now you mentioned about cifs version, I just tried changing the entry in fstab to vers=3.0, and the damn thing still connects !!. I'm sure that in Linux 20.3 it failed, ah well, that may cure my problem.
Yes, they copy fine from Linux, it was only happening inside FFS.

LeoW

So, you all set now?

I hope :-)
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

Yep, just tried a backup after deleting a couple of files out of folder that was giving me the problem and it sync'd to the cifs drive and maintained the folder name.

Thanks again for your help LeoW, you pointed me in the right direction :-)

LeoW

No problem.

Glad I could assist.

I've been working on getting a software program called clone To work for the last 3 hours and I've been so frustrated with Microsoft Onedrive account. I have it configured successfully in windows and for some reason my Linux connect won't work. no Microsoft wants me to verify my login id by sending a code to a different email address and they're not sending me the code.

Frustrating. At least one of us got something done positive tonight..
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

lol I've been working a an app for Linux/Windows and had problems when Onedrive was being used, fortunately the solution was relatively simple. Windows, the one reason I use Linux as my main OS, Windows is relegated to a VM. Good luck with MS ;)