Issue with rsync

I had a NAS setup with one 14TB HD for the last year. I have a spreadsheet on there that was important so to back it up I rsync from my daily driver computer to four different drives on the daily driver. It would run every minute and worked without issue for the last year.

I recently had the money to buy 2 more 14TB drives and decided to create a NAS with parity. I installed the drives and due to only having 3 SATA ports on the computer I had to buy a NVME and plug it into a x16 PCIe slot.

I installed Truenas and created a raidz1 then started setting up the same as I had before. I copied the spreadsheet over and went to my daily driver and started setting up crontab (daily driver runs Linux). It doesn’t work. Nothing I do will make it work. It seems to run the command. I can look in the syslog and it shows it runs the command so nothing is wrong there on the daily driver. The issue is on the NAS.

I believe the issue is to do with the dataset but cant seem to fix it. I set up the dataset/pool as “All_Media/Media”. However in Nero file explorer the path shows as “smb://truenas.local/media/midnight/Utility_Bills”. It should be “smb://truenas.local/All_Media/Media/midnight/Utility_Bills”.

I have tried deleting the dataset and starting again but it always shows up the same. For clarity, I set it up “All_Media/Media” with caps. It shows as “media” no caps in the file explorer (Nero).

I went as far as deleting all partitions of the boot drive and the 3 data drives but it made no difference. Any help would be appreciated.

I had a look at using the NAS rsync but couldn’t find a way to get it to work with the daily driver. The NAS backup would only work to cloud storage. I really want to get to the bottom of what’s happening with the NAS.

ADDED: I am quite willing to delete and start again if someone want to help me set it up again. I have nothing on there except that one file, all my media is backed up on external drives so there is no problem starting again.

If you are sharing the “media” dataset, then this path looks right. The clients do not need to know about any parent datasets, they just use the share as their root.

Your issue is likely due to:

  • Some issue in your cron command (please post it).
  • The way you are mounting your smb shares (please detail how you do this).
  • Permissions (post the permissions currently applied).

Possibly a combination of the above.

Have you tried doing the transfer manually in the client shell (ie, not using cron), to see if you can see any error message?

Thanks for the reply.

The reason I question the path is the old original one had the parent in the path. What about the fact that I set it up with caps but it shows without caps. Linux is case sensitive so surely that should be an issue or am I misunderstanding?

I’ll go into the shell and try running the command. I don’t think the cron command is wrong because it shows in the logs ok ad as stated it worked fine for close to a year.

Cron Command:
0 * * * * rsync “/run/user/1000/gvfs/smb://truenas.local/media/Utility_Bills/Utility Bills.ods” “/home/midnight/Documents/Utility Files Electric Rent Council Tax/Utility Bills.ods”

The way I run it multiple times is repeat the command with the times adjusted as separate commands same thing with the different drives I write the rsync to, but here is another for clarity.

1 * * * * rsync “/run/user/1000/gvfs/smb://truenas.local/media/Utility_Bills/Utility Bills.ods” ‘/usb/midnight/Store10’

I wont post all the others because they are more or less repeats of these with just different times and paths as needed.

Permisions

SMB Shares

For the old install I didn’t have a separate Utility_Bills share I just added in to see if it fixed but it didn’t.

I’ve tried doing the transfer from the NAS shell. The problem is I don’t know how to reference the daily driver computer in the command. In other words I can’t find the address of the daily driver. I’ve managed to get to the file system of the NAS but cant find the daily driver as a mount point anywhere. I’m copying files across to the daily driver so it should show up somewhere as a mount point. Can someone show me where to find it or the command to use. The IP of the daily driver is 192.168.1.70 but I don’t know how to use it in he command.

I’ve tried running the command from a terminal on the daily driver. Here is the complete command and error.

midnight@linux-tower:~$ rsync “/run/user/1000/gvfs/smb://truenas.local/media/midnight/Utility_Bills/Utility Bills.ods” “/home/midnight/Documents/Utility Files Electric Rent Council Tax/Utility Bills.ods”
rsync: [sender] change_dir “/run/user/1000/gvfs/smb://truenas.local/media/midnight/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$

It can’t find the file even though it is there. I copied the address from the system address bar. Any help to get to the bottom of this would be appreciated.

ADDED: Just want to add that I can read and write to the file with no problem so can’t see that it is a permission problem. I think it’s something to do with the path but don’t understand what. There must be someone who understands NAS file systems and access.

One last question if anybody can answer.

My old system was a single drive in the NAS. Rsync worked fine. I now have a 3 drive raidz1 and rsync doesn’t work.

Could the fact that its a raidz1 be the reason rsync doesn’t work. I ask because I’ve deleted and remade the NAS and dataset multiple times and always get the same error, rsync can’t find the file even though its there.

I’m talking about the rsync from the daily driver not the rsync within the NAS.

rsync doesn’t know or care what kind of mirroring/parity is going on in the filesystem it’s reading or writing from/to. It’s just using standard OS system calls to read and write files.

@midnight_hot
It’s kinda late here and my brain just wont wrap around your actual rsync problem.
But if i’m understanding it right you have a larger list of files wich you are rsyncing via crontab?

if so, maybe have a look at the ‘Syncthing’-App. I use it to have all my documents synced to TrueNAS and my other devices as soon as i hit save or copy a bill.pdf into its folder.

Sorry and ignore if this is of no help and totally off topic for you… o/

That’s what I thought but I cannot find anything wrong and the only difference is the fact that I’m now rsyncing to/from a raidz1 instead of single drive as in the past when it worked.

I appreciate any help. I’m have one spreadsheet on the NAS. I’m trying to rsync to multiple locations on my daily driver. It used to work fine, for about a year. Now it can’t find the file. It says “no such file or directory”. The file is there. I can open it and use it fine. rysnc just cant see it.

I’ll have a look at Syncthing app, hope i can get it for Linux.

ADDED:

here are some tries from a terminal on the daily driver. Posting to see if anyone can help me understand what’s happening. Copy paste them into a notepad file and stretch it out to make it easier to see the command and error from system. Why does it say “No such file or directory” when the file is there and accessible.

midnight@linux-tower:~$ rsync “/run/user/1000/gvfs/smb://midnight@192.168.1.192/shows/Utility_Bills/Utility Bills” “/home/midnight/Documents/NAS Test”
rsync: [sender] change_dir “/run/user/1000/gvfs/smb://midnight@192.168.1.192/shows/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$ rsync “/run/user/1000/gvfs/smb://midnight@192.168.1.192/shows/Utility_Bills/Utility Bills” “/home/midnight/Documents/NAS Test”
rsync: [sender] change_dir “/run/user/1000/gvfs/smb://midnight@192.168.1.192/shows/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$ rsync “/smb://midnight@192.168.1.192/shows/Utility_Bills/Utility Bills” “/home/midnight/Documents/NAS Test”
rsync: [sender] change_dir “/smb://midnight@192.168.1.192/shows/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$ rsync “/smb://midnight@192.168.1.192/mnt/all_media/shows/Utility_Bills/Utility Bills.ods” “/home/midnight/Documents/NAS Test”
rsync: [sender] change_dir “/smb://midnight@192.168.1.192/mnt/all_media/shows/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$ rsync ‘/smb://midnight@192.168.1.192/mnt/all_media/shows/Utility_Bills/Utility Bills.ods’ ‘/home/midnight/Documents/NAS Test’
rsync: [sender] change_dir “/smb://midnight@192.168.1.192/mnt/all_media/shows/Utility_Bills” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$

somehow i feel the rsync syntax is not quite right…
try loosing the’/smb//://’

eg:
rsync -a ‘midnight@192.168.1.192/ShareNameAndPath/Utility Bills.ods’ ‘/home/midnight/Documents/NAS Test/’

also in linux there is a difference between “`” and “'”… stuff in “``” gets executed in line.
but i’m not sure if this just got converted on the copypaste way into the forum.

Thanks for the reply. I appreciate everything because I’ve run out of ideas. It worked in the past now nothing I do will make it work. Here’s the output from your suggestion.

midnight@linux-tower:~$ rsync -a ‘midnight@192.168.1.192/truenas.local/shows/Utility Bills.ods’ ‘/home/midnight/Documents/NAS Test/
rsync: [sender] change_dir “/home/midnight/‘midnight@192.168.1.192/truenas.local/shows” failed: No such file or directory (2)
rsync: [sender] link_stat “/home/midnight/Bills.ods’” failed: No such file or directory (2)
rsync: [sender] change_dir “/home/midnight/‘/home/midnight/Documents” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$

As you can see it can’t even find the output now. The quotes make no difference. I’ve always used double coz it’s easier for me to type, but I did try with single just in case but it made no difference.

Keep trying to come up with ideas coz I really want to understand what’s happening as it makes no sense to me.

UPDATE:
Sorry made an error. Missed one of the single quotes. When I retried with single quotes where needed it just hung. Retried with double and here’s the output.

midnight@linux-tower:~$ rsync -a “midnight@192.168.1.192/truenas.local/shows/Utility Bills.ods” “/home/midnight/Documents/NAS Test/”
rsync: [sender] change_dir “/home/midnight/midnight@192.168.1.192/truenas.local/shows” failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
midnight@linux-tower:~$

Update:
Just noticed I missed a leading forward slash but when I tried it made no difference, same output.

Don’t know if anyone’s interested but I found the issue.

Weird, the command has changed for some reason.

This is not the full command but is the bit that’s changed.

This Works
smb-share:server=truenas.local,share=shows/Utility_Bills

This Doesn’t work
smb://truenas.local/shows/Utility_Bills

I know I had it working for the past year so I’ve no idea why the format has to be different now but at least I got to the bottom of it.

This looks weird.
Wouldn’t truenas.local resolve to 192.168.1.192 already?

So that line is basically saying this:
rsync -a “midnight@192.168.1.192/192.168.1.192/shows/Utility Bills.ods” “/home/midnight/Documents/NAS Test/”

Edit: Aren’t you also missing a colon after the IP/Servername?

Either way, good that you got it working.

Originally I used smb://truenas.local, the ip was tried because I was trying different things. The crazy thing is the whole format of the command is different now. What worked before will not work now. I had always taken the address from the address bar of nemo file explorer and it always worked, until I remade the NAS.

I noticed when looking through the filesystem that it looked different and tried that and after a few attempts changing the path it worked.

Thanks to everyone who looked and tried to help.