Hi,
Matt Miller wrote on 14.06.2007 at 11:45:11 [[BackupPC-users] command line
restore problems]:
> I'm having trouble restoring backups via the command line.
> [...]
>
> $/usr/share/backuppc/bin/BackupPC_tarCreate -h tracy -n -1 -s
> "Documents&Settings" Desktop "My Documents" >
> /var/lib/backuppc/pc/tracy/tracy-backup.tar
> /usr/share/backuppc/bin/BackupPC_tarCreate: bad share name
> 'Documents&Settings'
>
> the share name from the relevant config.pl
> $Conf{RsyncShareName} = 'Documents&Settings';
>
> My fear is that the ampersand is messing things up.
correct. The regular expression used for checking the validity of a share
name in BackupPC_tarCreate 2.1.1-2sarge2 (which is the closest to 2.1.2-6
I've come across) does not allow ampersands. That's a bug which is fixed in
BackupPC 3.0.0 (possibly earlier).
Change line 128 of BackupPC_tarCreate:
- if ( $opts{s} !~ /^([\w\s\.\/\$-]+)$/ && $opts{s} ne "*" ) {
+ if ( $opts{s} =~ m{(^|/)\.\.(/|$)} ) {
> Oh yeah, I'm using BackupPC version 2.1.2-6 installed from the .deb
> package on Debian Sarge (Stable at the time, now I think it's Old Stable).
Yes, Debian sarge is now oldstable, etch is stable.
Les Stott wrote on 15.06.2007 at 07:31:27 [Re: [BackupPC-users] command line
restore problems]:
> Matt Miller wrote:
> > [...]
> > $/usr/share/backuppc/bin/BackupPC_tarCreate -h tracy -n -1 -s
> > "Documents&Settings" Desktop "My Documents" >
> > /var/lib/backuppc/pc/tracy/tracy-backup.tar
> > [...]
> Just a thought....
>
> try quoting using 'Documents&Setting' instead of "
I don't know of any shell that treats '&' differently in '' and "" ...
> or try quoting the entire command in ``
Are you suspecting he's got a command named Documents&Settings in the path
that outputs the correct share name to stdout? :-)
Regards,
Holger
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/