Re: Stupid restore question

Miek Gieben <[email protected]> Tue, 18 May 2004 14:57:41 +0200
Newsgroups gmane.comp.sysutils.backup.hdup.general
Message-ID <[email protected]>
[On 18 May, @14:44, James wrote in "Re[2]: [hdup-user] Stupid rest ..."]
> Hi Miek,
> 
> Not quite sure I understand what you're telling me (is there
> something wrong that you are have fixed? Or did I do something
> wrong?)

I fixed it so that hdup will correctly say: STARTING REMOTE RESTORE
which is more sane than stating: STARTING BACKUP, when doing a
restore.

> To answer the other question: I do not want that prerun script (the
> backup one) to run on a restore. I expect I am only going to restore
> stuff manually, and not very often - in which case I would probably
> shut down whatever services are needed by hand first.

In which hdup? We have:

hdup local: which is running a 'restore' @remotehost
hdup remote: which is running a 'remote' from somewhere

'hdup local' does not run any prerun scripts.

'hdup remote' does run the prerun scripts. And I have this great
comment in the code:

                /* prerun scripts are run! 11-09-2003 */
		backup_remote(host, which, &arg);

Ah, it's explained in the backup_remote function:
        /* run the prerun script - do this way early. People like to mount their
         * backup filesystem before doing anything */
        /* 11-09-2003: added this to also run when doing remote backups */
        if ( host[which]->prerun != NULL ) {


So your remote hdup prerun script should check that scheme is 'remote' and then
cleanly exit - I *think* that will fix it.

Does this make sense?

> I could see that in the future I might try to set up an "automatic"
> restore every night to actually copy my entire production server
> "simon" to the backup server "simonback" so I had it ready to go in
> the event of a disaster. In this case, I would probably want to run a
> different prerun/postrun script for the restore. But I'm not quite there
> yet...

ok, sounds nice :-)

grtz Miek