[rear-users] recovery scenario

Schlomo Schapiro schlomo at schapiro.org
Thu May 30 16:44:41 CEST 2013


​Hi Tim,​

On 30 May 2013 16:10, <Tim.Einmahl at kba.de> wrote:

> There is just one problem left at the moment: I need to run the sed
> command with a few parameters
> before recovering. There is the PRE_RECOVERY_SCRIPT option, but is it also
> possible to define a command + parameters
> in rear that will be run instead of defining a script that then would have
> to exist on every server?
>

​I am not sure I understand this question. Is your problem that you need to
add a script?​ PRE_RECOVERY_SCRIPT can be anything that you could call on a
shell command. If you just need a single command then that will also work.
Check
https://github.com/rear/rear/blob/master/usr/share/rear/setup/default/01_pre_recovery_script.sh
for
how this is called. You could add something like this for your sed command:

PRE_RECOVERY_SCRIPT=( sed -i -e "s/foo/bar/" /some/file.txt )

Regards,
Schlomo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-users/attachments/20130530/f59e43af/attachment.html>


More information about the rear-users mailing list