[Zope] How to backup Zope data base?

Martijn Pieters mj@digicool.com
Thu, 18 Jan 2001 17:02:25 +0100


On Thu, Jan 18, 2001 at 09:02:06AM -0600, Marty Stitt wrote:
> While this topic of backup has come up, I'm wondering about restore.
> 
> Looking at Data.* files in the var directory, I see:
> 
>   Data.fs     
>   Data.fs.index  
>   Data.fs.old  
>   Data.fs.in  
>   Data.fs.lock   
>   Data.fs.tmp  
> 
> If I need or want to implant a Data.fs file into a system, either to restore a
> system from corruption, or to copy my working information from my office
> system to my home system (and visa versa), I suspect that I should also delete
> the .index, .lock, and .tmp files.  Regarding the .in file, I believe it must
> remain.  But, these are just hunches I have.
> 
> Can anyone shed any light on this?  Thanks in advance.

You can only restore from a backup Data.fs when the site isn't running.

- Data.fs.lock is the lock file for a running site, no need to back up.

- Data.fs.old is the Pack operation created backup copy.

- Data.fs.in is the default database for a new Zope installation. When
  there is no Data.fs, Data.fs.in is copied to Data.fs automatically on
  startup.

- Data.fs.tmp I can't remember what it is used for, but I think it is only
  used for sub-transactions. No need to back it up or restore it.

- Data.fs.index ihelps Zope to start up faster with a large Object
  Database. IIRC it records the position(s) of current versions of objects
  in the Data.fs so Zope can skip the Undo information faster. IIRC Zope
  will detect when the file is outdated/invalid after a restore.

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------