The setup is: Clients -> Server -> NAS. ssh from Client to server, cifs from server to NAS.
First bit, make ssh keypairs for the clients, if the backup-process is supposed to be unsupervised, then make keypairs without passwords. Then I needed to fiddle with the backup-share, permissions screwed with rsync, generating a lot of noise in the log. Stuff got backed up though. Heres what my backupscript ended up looking like:
#!/bin/sh# for copy from CLIENTBACKUPDIR to /mnt/Backup/$BACKUPUSER directory on serverCLIENTBACKUPDIR=XXXBACKUPUSER=XXXSERVERHOST=URLSSHUSER=XXXcd $HOME || exit 1rsync –delete –exclude-from=$HOME/.rsync/exclude-backup \–timeout=999 -azu \-e “ssh -l $SSHUSER -i .ssh/backup -ax -o ClearAllForwardings=yes” \$HOME/ $SERVERHOST:/mnt/Backup/$BACKUPUSER
#Backup-excludefile– /Media/*– /Music/*– /.*