Hi,
absolutely_free AT libero DOT it wrote on 2015-11-09 16:24:29 +0100
[[BackupPC-users] Command line restore]:
> Hi,I am using BackupPC 3.2.1-4 (official Debian package).Is there a way to
> launch a restore process through command line?
yes.
> I mean, I don't want to create a tar / zip archive. I need to restore files
> to original server.Thank you very much
Considering the web server doesn't do the restore itself but rather instructs
the BackupPC server to do so, there must be a way.
Regards,
Holger
P.S.: In case you were wondering *how* to launch a restore via command line,
it's a bit complicated. The command as such is something like
BackupPC_serverMesg restore <ip> <host> <user> <request file>
where <ip> should probably be the IP address of <host> (but will
apparently be looked up(*) if it isn't - presuming some piece of code
doesn't complain first), <user> is only for logging purposes, if I
remember correctly, and <request file> might be somewhat difficult
to construct. Technically speaking, it isn't, it's just a Data::Dumper
dump of a Perl hash containing the relevant information. So, what is
the relevant information? Let's do it the easy way (for both you and
me): initiate a restore from the web interface (and make sure to either
direct it somewhere it won't do any harm or make (absolutely) sure you
actually can't restore; better yet, do both), and after it has completed
or failed, look in $TopDir/pc/<host> for a file named RestoreInfo.n (and
unless that turns out to be RestoreInfo.0, you can skip that part and
just look at one of the preexisting files straightaway). Figure out what
the individual hash entries mean and fill the values to match your needs.
You can probably get away with setting 'num' => -1 to always refer to
the latest backup and leaving 'reqTime' as it is (even though that will,
strictly speaking, be incorrect), but I'd test that, just to be sure.
Hint: for a full restore, I get "fileList => [ '/' ]" (among other hash
entries).
As always, you need to run BackupPC_serverMesg as the backuppc user.
Hope that helps.
(*) As I read the code, <host> will be looked up if <ip> doesn't look
like an IP. You might expect <ip> to be looked up, but that
apparently is not the case.
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|