Permissions causing full backups?
hashproduct+rsync at gmail.com
Tue May 2 20:26:20 GMT 2006
On Tue, 2006-05-02 at 15:33 -0400, Link McGinnis wrote:
> Obvious question: What caused the timout? If I try the rsync with only one
> ":" in the destination, I get a successful copy but the files are copied to
One colon means to run rsync over SSH, which means the destination path
is relative to your home directory and the daemon is ignored completely.
I thought there was some trouble with using SSH on Cygwin, so I
recommended using an rsync daemon, but maybe the problem has been fixed.
I'm not sure why the connection is timing out as opposed to being
refused. Maybe there's a firewall that times out connections on all
ports except the ones it knows about, such as SSH. If this is the case,
you can forward the daemon's port to the Windows machine with SSH (the
fourth method on http://rsync.samba.org/firewall.html ) or invoke a
single-use daemon over SSH (see the rsync man page).
You could even use plain rsync over SSH, but then you'd have to find a
way to invoke rsnapshot after a successful transfer other than a
daemon's post-xfer exec. I can think of two possibilities. One: Put a
script "rsync-and-kick-rsnapshot" on the server that says:
rsync "$@" && ./kick-rsnapshot
and tell the client rsync to invoke it with:
Two: add a line to the end of your backup script:
ssh $user@$bkup_ip rsnapshot <...>
If all the Windows users who will be making backups already have
corresponding accounts on the Linux server, it might make more sense to
use plain rsync over SSH or single-use daemons over SSH with daemon
authentication disabled than to set up a collection of rsync users
paralleling the system ones for the global daemon with authentication.
> 2nd question: How can I know that my rsync is communicating with the daemon
> on the samba server? The daemon is supposed to be listening on port 3141
> but I haven't told the rsync to "push" to that port. Right?
You could manually connect to the daemon from the Windows machine using
netcat, if you have it: nc $bkup_ip 3141 . You should see a message
resembling @RSYNC: 29 . At this point, a client rsync would respond
with a similar message and the transfer would start, but you can just
press Ctrl-C to drop the connection.
To specify the port to rsync, either use --port=3141, or use the
rsync:// format for the destination path so you can include the port:
Once you get this part working, set up rsnapshot in /samba and add the
post-xfer exec line as I described in the other message.
More information about the rsync