NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
readyjoove
Nov 01, 2020Aspirant
Pull backup using Rsync over SSH. Log says Success but one home dir is empty!
NAS scenario New 626x got the disks from my old Pro 6 into it (same bays) Pro6 got two disks (new) and imported configuration from my previous backup-nas o(NR102 I think) Pro 6 runs the backup j...
- Nov 03, 2020
readyjoove wrote:
Is there is a standard way to have the source-nas support rsync server for home folders ?
Not that I know of. It's not an issue for me, as I have the home folders turned off (no sharing protocols enabled at all). You might consider that. You can of course set up a public share with limited access. It just wouldn't have the same name as the user account.
If you plan to use ReadyCloud, the home folders have another disadvantage - you'd have two ReadyNAS accounts (one local, and one ReadyCloud), which pretty much makes the home folders worthless.
readyjoove wrote:Looks like push-based backups should work just as well but I was never clear on how to manage backup-nas power scheduling. Pushing to the backup-nas's rsync-server will not delay backup-nas shutdown right ?
...
Looks like push backup uses snapshots and maintains integrity better so definitely worth researching further.
Yes, that is the tradeoff. Push backups back up a snapshot, which gives you a coherent backup. But the receiving NAS can shutdown in the middle if it is on a power schedule. My own approach is share-by-share pull backup, with the backups running off hours.
But it would be nice if there was a way to use a power schedule with push-backup jobs.
readyjoove
Nov 03, 2020Aspirant
Thanks for responding Stephen! Much appreciated.
The goal is to perform full-nas backup. I wanted to replicate the share structure so I created the same shares on the backup nas and then the backup-nas would do a rsync pull for each share. The left over bits were the home-dirs which do not expose rsync (not over the GUI atleast). To back those up via pull, I am using rsync-over-ssh.
Is there is a standard way to have the source-nas support rsync server for home folders ? The rsyncd.conf only lists the shares and the GUI has no rsync options for home folders. Did I miss a config setting ?
rsync-over-ssh uses root as the user with the public-key from backup-nas imported into the source-nas.
StephenB
Nov 03, 2020Guru - Experienced User
readyjoove wrote:
Is there is a standard way to have the source-nas support rsync server for home folders ?
Not that I know of. It's not an issue for me, as I have the home folders turned off (no sharing protocols enabled at all). You might consider that. You can of course set up a public share with limited access. It just wouldn't have the same name as the user account.
If you plan to use ReadyCloud, the home folders have another disadvantage - you'd have two ReadyNAS accounts (one local, and one ReadyCloud), which pretty much makes the home folders worthless.
readyjoove wrote:Looks like push-based backups should work just as well but I was never clear on how to manage backup-nas power scheduling. Pushing to the backup-nas's rsync-server will not delay backup-nas shutdown right ?
...
Looks like push backup uses snapshots and maintains integrity better so definitely worth researching further.
Yes, that is the tradeoff. Push backups back up a snapshot, which gives you a coherent backup. But the receiving NAS can shutdown in the middle if it is on a power schedule. My own approach is share-by-share pull backup, with the backups running off hours.
But it would be nice if there was a way to use a power schedule with push-backup jobs.
- SandsharkNov 04, 2020Sensei
StephenB wrote:But it would be nice if there was a way to use a power schedule with push-backup jobs.
The ability of a backup job to send a WoL to the remote NAS and a shut-down at the end would certainly help. Of course, if there were a scheduled or manual shut-down on the remote NAS, that would override.
- StephenBNov 04, 2020Guru - Experienced User
Sandshark wrote: The ability of a backup job to send a WoL to the remote NAS and a shut-down at the end would certainly help.That would help, but if you have multiple backup jobs (which I do), you'd need to some way of knowing that all the backup jobs had finished (only sending the manual shutdown after the last one).
- readyjooveNov 05, 2020Aspirant
Trying to get closure on this rsync-over-ssh thing but I am not able to make much progress. If I try a basic version of this command from the shell, it works quite nicely.
rsync -e "ssh -i ~root/.ssh/id_rsa" -a -vvv @vamsi-nas:/home/ /data/Backup/HomeBackups
I also tried to have one rsync-over-ssh pull job per home folder and that worked too. It is just the GUI version of rsync-over-ssh that is failing. Maybe ssh as root has some problems (like nfs squashes root down) but why it works for all users except one is not clear. Seeing the "+" signs on the permissions reminded me to check the acls but nothing there was nothing peculiar. No difference between the directories that worked and the one that failed.
getfacl -a homeDir
Spent a bit of time with chat-support. Support decided that while the 626X is new, the out-of-warranty Pro 6 is the one doing the pulls, they cannot offer any help on why the pull jobs are failing. Also refused to give me the command liness that the rsync-over-ssh job uses (i'd expect it to work on any ssh system but not sure if there is a readyNas specific thing that they want to keep obscure?).
I half-expected this punt but it is disappointing. Same OS 6.10.3 on x86, likely some specific interaction with ssh+rsync and file system: hopefully it was forwarded to someone inside to atleast enable verbose log options for the rsync job. The Pro 6 is 11 years old, was replaced under warranty for a power supply failure and running strong. Happy enough with it, and hope the 626x lives just as long. While support deserves a review ding, I am happy they are allowing old units to continue to get updates so it all evens out I guess.
Anyway, will asume that rsync-over-ssh is broken and move the home dirs to shares as StephenB suggests and resume my pull rsyncs. Push is nice but I need power schedule based stuff to work.
Thanks again for chiming in StephenB and Sandshark. You guys are always helpful and the effort is much appreciated.
- StephenBNov 05, 2020Guru - Experienced User
readyjoove wrote:
Anyway, will asume that rsync-over-ssh is broken and move the home dirs to shares as StephenB suggests and resume my pull rsyncs.
One silver lining here is that if you ever need to rebuild from scratch, it is much easier to restore shares than it is to restore home folders. You need to first recreate the accounts, and then access them via SMB in order to get the home folders recreated.
While the home folder feature has value for enterprise, I don't think it is worth the bother for home users.
- readyjooveNov 06, 2020Aspirant
Agree. Shares simplify things greatly for home users.
From past experience, restoring from a backup turns out to work well as well. After a factory reset, I had imported a previously saved config and all the users, groups and shares came back right away. After that I nfs mounted the backup share from the backup-nas and copied everything over in one shot (with a chown -R on each user folder after that).
The following config works (in 6.10.3 atleast). For each user-share.
- folder owner changed to user-account/users
- permissions changed to 0 for everyone and rw for admin and user
- rsync continue to work well from the backup-nas
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!