BackupPC-users

Re: [BackupPC-users] New restore option

2008-06-12 02:19:07
Subject: Re: [BackupPC-users] New restore option
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: Carlos Anan as Del guila <cananiasdelaguila AT gmail DOT com>
Date: Wed, 11 Jun 2008 23:18:51 -0700
Carlos writes:

> In the "Restore options for ..." screen there are three options:
>    Option 1: Direct Restore
>    Option 2: Download Zip archive
>    Option 3: Download Tar archive
> 
> I'd like to include a new option in order to select different
> scripts to execute after restoring the file to a specified
> location. This could be like option 1, where i can select host,
> share and dir (relative to share) plus a selection element
> where i can choose a script to execute via ssh... (the list of
> scripts could be in a text file or a database)
>
> My question is ... how do i start? wich part of the backend is related
> with this functionality?... I've no idea about perl, but if i have any
> clue about where to start i think i could manage...

I'm not sure the user would normally want this sort of flexibility.

First, look at $Conf{RestorePostUserCmd}.  You can use it to specify
a command to execute after the restore completes.

Rather than have multiple scripts, I would recommend adding an option to
the CGI interface (see the lib/BackupPC/Lang files), copying the option
value to the restoreReq file (see lib/BackupPC/CGI/Restore.pm) and then
passing that option value to the $Conf{RestorePostUserCmd} script (see
bin/BackupPC_restore).  Your $Conf{RestorePostUserCmd} script can then
take that argument and execute the corresponding functions.

Craig

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>