[p4] Automated Remote Restores
robert at vaccaperna.co.uk
Wed Mar 12 04:19:50 PDT 2008
It's probably easier to pull rather than push, unless you have a tame
framework for doing so (I am sure they exist). I have seen the following
work very successfully:
- live server has a cronjob (Windows scheduled task)
- does journal
- this is copied to common backup fileshare
- shadow server has a scheduled task set an hour or two after it is known
the other will complete (non-existence is an error)
- looks for latest journal on backup fileshare
- restores and checks for errors, and email if so
The above all achieved via bash scripts, but not hard, especially in python.
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Dix, John
> Sent: 11 March 2008 23:29
> To: perforce-user at perforce.com
> Subject: [p4] Automated Remote Restores
> Hello I am working on some code that will allow me to
> automate the Perforce db restoration process on a Windows
> 2003 server using Python. I want to do this as part of my
> Backup script where after I rsync the files over I then do a
> restore to a test Perforce server.
> My thoughts are to do this:
> 1. From backup script, emotely spawn an instance of
> Python.exe on
> the target server which then executes script which does an
> automated restore.
> 2. Copy the log file back and scan for an error token.
> 3. Send email with pass or in the case of fail, with
> the log file
> as an attachment.
> Does anyone have a better way of doing this? I have never
> used Python to spawn external processes on a remote networked
> system before so suggestions are helpful. J
More information about the perforce-user