Last month I bought a Zyxel NAS326 (RAID 1 2x 4TB HDD) to use as a backup target for my Debian desktop and a couple of Windows laptops. From my Debian machine I mount the NAS
sudo -s mount -v -t cifs -o username=username,uid=1000,gid=1000 //192.168.1.XX/username/ /home/username/NAS326/
Then I use rsync to backup to the NAS
rsync -vartH --exclude={'.*','NAS326'} /home/username/ /home/username/NAS326/DesktopBackUp/username/
All files are being copied each time, so the date, file size, or something else isn't being compared correctly. This seems to be a somewhat common issue, but I haven't been able to find a solution yet. The closest I've found is here:
https://serverfault.com/questions/26241 ... every-time
Any ideas? Maybe mount as or with a different FS other than cifs?
Backing up to NAS with rsync
Backing up to NAS with rsync
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
- donald
- Debian Developer, Site Admin
- Posts: 1362
- Joined: 2021-03-30 20:08
- Has thanked: 243 times
- Been thanked: 296 times
Re: Backing up to NAS with rsync
rsync -avzxtH
-a Archive
-v Be verbose
-z Compress files during transfer
-x Don't cross filesystem boundaries (I.E. stay within mount points)
-t Copy transfer times
-H Preserve hard links
-a Archive
-v Be verbose
-z Compress files during transfer
-x Don't cross filesystem boundaries (I.E. stay within mount points)
-t Copy transfer times
-H Preserve hard links
Typo perfectionish.
"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank
"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank
Re: Backing up to NAS with rsync
I"m not near it, but I'm pretty sure I can ssh into it and yes it does have rsync.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
Re: Backing up to NAS with rsync
I'll add the x and z options, run the command and report back with the results.
Thanks to both of your for the suggestions.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
-
- Debian Developer
- Posts: 575
- Joined: 2022-07-12 14:10
- Has thanked: 2 times
- Been thanked: 115 times
Re: Backing up to NAS with rsync
The point is that if it has ssh and rsync you could omit cifs completely. If you run rsync against a locally mounted cifs filesystem it is going to need to download all metadata locally to do the comparison. If you use rsync with ssh it will do this on the NAS itself.
Re: Backing up to NAS with rsync
Looks like I can only ssh into the NAS with the admin account and not a regular user despite having regular user sub-directories in /home. I'm looking into see why that is...I would have thought that any user could ssh into the NAS. I don't use ssh much, but i've been able to ssh into other Linux boxes on LANs as long as I knew the username & password which was typically my account, just on a different Linux machine on the same network.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
Re: Backing up to NAS with rsync
Check if your NAS supports the rsync daemon (vs cifs, ssh, etc.)
Then you can use something like
(where in the server you define the "module" module as pointing to the appropriate directory).
Then you can use something like
Code: Select all
rsync -av /home/username/ user@server::module
Re: Backing up to NAS with rsync
Only root/admin can.reinob wrote: ↑2023-01-09 12:58 Check if your NAS supports the rsync daemon (vs cifs, ssh, etc.)
Then you can use something like(where in the server you define the "module" module as pointing to the appropriate directory).Code: Select all
rsync -av /home/username/ user@server::module
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.