![]() exclude some useless directories from the backup.keep a copy of the previous version of each modified file in a dedicated folder with the current date, every time the backup is performed.connect to the randomly-chosen port 23342 : this is useful if your NAS is an a local network behind a router/firewall/NAT, you can configure the NAT to redirect the external port 23342 to the port 22 on the NAS (this can make your configuration safer against bots looking for open SSH ports to exploit).Rsync -az -e "ssh -p 23342" -backup -backup-dir="rsync_bak_`date '+%F_%H-%M'`" -exclude 'tmp*' -exclude 'cache*' -exclude 'logs' /var/www will : fire rsync with something like this : rsync -az /var/www is an example of a more complex rsync command :.choose (create if necessary) the shared folder you want to push to, for example Backups.make sure the rsync service is enabled in Control panel > File Services > rsync > Enable rsync service (do not check Enable rsync account).In order to push data via rsync on the NAS, here are the steps to follow : Note : if this still does not work, take a look at the answers in the comments below for troubleshooting ideas. if you only want to use rsync with this user (not SSH) you can now remove the backup user from the administrators group.now, the authentification should work : from the server, try to log in to the NAS ( ssh and check that it logs in without requiring a password.this is important : connect to the NAS by SSH and check the files permissions :.copy the public key to the NAS : ssh-copy-id (you will need to enter the password of the backup user). ![]() connect to the server and generate a key pair if don’t have one already : ssh-keygen -t rsa.add the backup user to the administrators group. ![]() Let’s assume you want to allow a remote server to authenticate with the user backup : Now that public key authentification is enabled, you need to exchange keys for each host and user that need to be able to automatically authenticate.
0 Comments
Leave a Reply. |