Hi there,
On Tue, 31 Oct 2023, Ghislain Adnet wrote:

?i was wondering if there was any way to restore from the command
line. I need to restore all /home/ daily to another server

?I was trying to use


/usr/share/backuppc/bin/BackupPC_restore


?but there is no docs and it fails for me as i try various things like

[~]: sudo -u backuppc /usr/share/backuppc/bin/BackupPC_restore 127.0.0.1 
myclientserver.com? /etc/vim/vimrc
/usr/share/backuppc/bin/BackupPC_restore: bad reqFileName (arg #3): 
/etc/vim/vimrc

usage: /usr/share/backuppc/bin/BackupPC_restore [-p] [-v] [-m] <hostIP> <client> 
<reqFileName>


any idea if this is possible ?

I'm sure it's possible, but not like that. :(

If I look at the code in BackupPC_restore (it's at line 72 in my
version but that's from 2020, yours may be different) I see

if ( $ARGV[2] !~ /^([\w.]+)$/ ) {
    print("$0: bad reqFileName (arg #3): $ARGV[2]\n");
    exit(1);
}

This tells me that you can't have anything other than a "word character"
or a dot in the third argument.  The '/' character isn't allowed.

$ perl -e '$word = "hello"; if( $word =~ /^([\w\.]+)$/ ) { print "matches\n"; } else { 
print "does not match\n"; }'
matches
$ perl -e '$word = "hello.world"; if( $word =~ /^([\w\.]+)$/ ) { print "matches\n"; } 
else { print "does not match\n"; }'
matches
$ perl -e '$word = "hello/world"; if( $word =~ /^([\w\.]+)$/ ) { print "matches\n"; } 
else { print "does not match\n"; }'
does not match
$

I suspect you might find an answer more to your liking in the mailing
list archives.

--

73,
Ged.


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to