push, pull confusion.
Matt McCutchen
matt at mattmccutchen.net
Tue Oct 14 00:31:39 GMT 2008
On Mon, 2008-10-13 at 11:47 -0500, Mark Busby wrote:
> I've been using rsync to back-up user files on samba shares. The idea was
> to capture the file changes from day to day work, back all changes and new
> files to a server with limited access. If someone wanted to delete the
> files, there would be a back-up of their work.
>
> While checking logs the other day, I noticed that on the files on
> the "backup server" where only a partial list of what users had in the
> samba shares. Running the rsync transfer by hand after making backups, I
> thought maybe I had a push-pull problem. Changing the command did transfer
> the newer files to the backup server. But I found that while cleaning out
> the group share that rsync is pushing old backup files into the samba
> shares from the backup.
>
> I would like to keep the old files on the backup server, but not transfer
> them back to the samba server. ie If a user deletes file "a.doc" from the
> samba share, it remains in the backup server but rsync doesn't put it back
> on the samba share.
It sounds like you want a one-way copy from the samba share to the
backup server without the --delete option. Another option worth
considering is to use a --backup-dir to move deleted files (and
overwritten ones too) to a separate place on the backup server.
> The backup server is running the rsync daemon.
> The command I have been using from the samba share computer.
> rsync -pavzW --stats user at 192.168.1.2::back_up_daemon /samba_shares
That command will copy from the backup server to the samba shares, which
I think is the reverse of what you want. Try this instead:
rsync -pavzW --stats /samba_shares user at 192.168.1.2::back_up_daemon
Matt
More information about the rsync
mailing list