laurent22 / rsync-time-backup

Time Machine style backup with rsync.
3.36k stars 443 forks source link

How to use rsync protocol with rsync daemon? #220

Open gr4nt3d opened 4 years ago

gr4nt3d commented 4 years ago

I would like to use the rsync protocol to backup my data to a NAS. However, the following call does not work

rsync://user@server:/path/target

Moreover ssh://user@server:/path/target doesn't work either, whereas just user@server:/path/target seems to work (but one has to enter the password unreasonably often without sshkey setup).

If this has not been implemented yet, is it possible to add this?

psmanek commented 4 years ago

Did you read the manual?

Backup to remote drive over SSH, on port 2222: $ rsync_tmbackup.sh -p 2222 /home user@example.com:/mnt/backup_drive

gr4nt3d commented 4 years ago

Yes I read that. I understand, that this would use the SSH-protocol not the rsync one.

psmanek commented 4 years ago

No. It will use rsync over SSH.

gr4nt3d commented 4 years ago

Ok, please pardon my lack of knowledge. But from this source I understood, that it would speed up the process, as no file lists would have to be built. Telling from my runs it is quite fast, but the output still goes through all the files, which takes quite a while even if nothing is being transfered. Now, I thought this was due to the wrong calling on my side. (Edit: Also the configured user for the daemon doesn't really show up)

How, can I discern if there is any benefit in running the rsync daemon? (The output looks identical)

mrPsycho commented 3 years ago

@gr4nt3d yes, you can use rsyncd on SRC server, and use that great script with plain rsync. what you need - is just comment section with checking SRC_FOLDER and you'll be able to run it like that:

./rsync_tmbackup.sh rsync://user@server/path/what/to/backup /path/to/backup