X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=inline;f=bin%2FBackupPC_restore;h=8f783168a5d6a841d0e242bba0dd2f0e3cc5d543;hb=5b3e6091d542c2e7445d5dd511cdf6e20aec8b8d;hp=2015df80213592afde932e88f6489f72d691bd90;hpb=17dcbbebb871212f90b81bb97f8d1feb528bdc43;p=BackupPC.git diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore index 2015df8..8f78316 100755 --- a/bin/BackupPC_restore +++ b/bin/BackupPC_restore @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 3.0.0alpha, released 23 Jan 2006. # # See http://backuppc.sourceforge.net. # @@ -43,6 +43,7 @@ use BackupPC::FileZIO; use BackupPC::Xfer::Smb; use BackupPC::Xfer::Tar; use BackupPC::Xfer::Rsync; +use BackupPC::Xfer::BackupPCd; use Socket; use File::Path; @@ -224,6 +225,16 @@ if ( $Conf{XferMethod} eq "tar" ) { $stat{hostError} = $errStr; exit(RestoreCleanup($client)); } +} elsif ( $Conf{XferMethod} eq "backuppcd" ) { + # + # Use backuppcd as the transport program. + # + if ( !defined($xfer = BackupPC::Xfer::BackupPCd->new($bpc)) ) { + my $errStr = BackupPC::Xfer::BackupPCd->errStr; + UserCommandRun("RestorePostUserCmd") if ( $NeedPostCmd ); + $stat{hostError} = $errStr; + exit(RestoreCleanup($client)); + } } else { # # Default is to use smbclient (smb) as the transport program.