I'm having an issue with the --suffix and -b flags - I've tried the following commands: rsync -avbr --backup-dir=/rsyncbackup rsynctest user@server.com::module rsync -avbr --backup-dir=/rsyncbackup --suffix="" rsynctest user@server.com::module and either way, I wind up with a tilde as a suffix on all the files moved into the backup directory at time of synchronization. According to the man page, if --backup-dir is specified, the default suffix should be a null character - but that's not what I'm discovering; I'm discovering that I CANNOT find a way to specify no suffix. I can successfully specify a DIFFERENT suffix - such as --suffix=.rsync - but I can't manage to specify no suffix at all. For reference, I'm issuing the rsync commands from a Windows 2000 laptop using cwrsync (based on rsync 2.6.0), and the server on the other end is a FreeBSD 5.1 machine running rsync 2.6.0 from the ports tree. Thanks ... Jim Salter JRS Systems
On Wed, Apr 07, 2004 at 06:13:31PM -0400, Jim Salter wrote:> and either way, I wind up with a tilde as a suffix on all the files > moved into the backup directory at time of synchronization. AccordingTurns out to be a problem caused by the fact that a daemon goes through the option-parsing code twice -- once when it first starts (and figures out that it is a daemon), and again when it is parsing the options sent from the connecting client. Since a client doesn't bother to send the --suffix option if it is specifying a default value, the daemon server ends up with the wrong default -- the one it decided on the first time through the option-parsing code. This will be fixed in 2.6.1 (patch appended). Thanks for the report! ..wayne.. -------------- next part -------------- --- options.c 31 Mar 2004 17:02:22 -0000 1.143 +++ options.c 7 Apr 2004 23:04:48 -0000 @@ -688,6 +688,12 @@ int parse_arguments(int *argc, const cha files_from = alloc_sanitize_path(files_from, curr_dir); } + if (daemon_opt) { + daemon_opt = 0; + am_daemon = 1; + return 1; + } + if (!backup_suffix) backup_suffix = backup_dir ? "" : BACKUP_SUFFIX; backup_suffix_len = strlen(backup_suffix); @@ -749,9 +755,6 @@ int parse_arguments(int *argc, const cha } } } - - if (daemon_opt) - am_daemon = 1; return 1; }
50 minutes for investigation *and* a patch!? Holy cow! Yeah, Mr Gates, that's the advantage of companies like yours; the support of your software. I mean, you just don't know where to get support on free software and what you do get, is er... oh hang on a minute! Amazing Wayne, just amazing. :) steve -------Original Message------- > From: Wayne Davison <wayned@samba.org> > Subject: Re: --suffix problem - possibly bug? > Sent: 07 Apr 2004 23:07:24 > > On Wed, Apr 07, 2004 at 06:13:31PM -0400, Jim Salter wrote: > > and either way, I wind up with a tilde as a suffix on all the files > > moved into the backup directory at time of synchronization. According > > Turns out to be a problem caused by the fact that a daemon goes through > the option-parsing code twice -- once when it first starts (and figures > out that it is a daemon), and again when it is parsing the options sent > from the connecting client. Since a client doesn't bother to send the > --suffix option if it is specifying a default value, the daemon server > ends up with the wrong default -- the one it decided on the first time > through the option-parsing code. This will be fixed in 2.6.1 (patch > appended). > > Thanks for the report! > > ..wayne.. > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -------Original Message-------
Seemingly Similar Threads
- "-b --suffix '' --delete --backup-dir /path/" combination does not act as expected
- rsync 2.6.0: possible sanitization bug?
- DO NOT REPLY [Bug 4621] "-p" option to simulate "mkdir -p" for rsync
- --compare-dest weirdness
- Differentiating debug messages from both sides