Every network administrator has at least heared of
rsync, the utility the synchronises file systems or directories - in most cases across different machines. We will use
rsync here to backup data on a QNAP NAS.
Log into the NAS via SSH.
First we create a separate group for our backup user.
Next comes the user account.
adduser -h /home/remotebackup/ -s /bin/false -G remotebackup remotebackup
The home directory is necessary because we need a place where we can store the SSH key.
Generate the key pair:
ssh-keygen -t rsa -b 2048
When asked for the target location of the key answer:
Do not use a passphrase since this would defeat the purpose of having non-interactive backups.
.ssh directory and its contents to the
chown -R remotebackup:remotebackup /home/remotebackup/.ssh