How to backup Zope data base?
Hi all What is the best way to backup Zope's database whithout stopping Zope? When I use backup, it just says that the file is in use and cannot be backed up. What I have done so far is to copy the file in explorer and back that up - but it feels kludgey and I'm not sure if I get the database in a state that is safe. Thanks all Etienne Tel: (012) 348 4586 Cel: 082 442 8981 Fax: (012) 361 8355
Etienne Labuschagne wrote:
What is the best way to backup Zope's database whithout stopping Zope? When I use backup, it just says that the file is in use and cannot be backed up.
MS Backup, yeah? Oh well, never mind ;-)
What I have done so far is to copy the file in explorer and back that up - but it feels kludgey and I'm not sure if I get the database in a state that is safe.
That's fine and quite robust. Copy and archive data.fs is the recommended way of backing up Zope on any platform. cheers, Chris
On Thu, 18 Jan 2001, Etienne Labuschagne wrote:
What is the best way to backup Zope's database whithout stopping Zope? When
Pack + backup Data.fs.old. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
What is the best way to backup Zope's database whithout stopping Zope? When
Pack + backup Data.fs.old.
Interesting approach! 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. -- Martin Stitt Chief Software Engineer Esker, Inc. email: marty.stitt@esker.com phone: (608) 273-6000 x331 fax: (608) 273-8227 web: http://www.esker.com
On Thu, 18 Jan 2001, Marty Stitt wrote:
Data.fs
This is the real database file.
Data.fs.index
Its index. Remove before replacing Data.fs.
Data.fs.old
This is backup after Pack.
Data.fs.in
This is initial Data.fs - installation process copy this into Data.fs before starting Zope for the first time.
Data.fs.lock Data.fs.tmp
Temporary files. Feel free to remove them when Zope is not running. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
This is the real database file.
Data.fs.index
Its index. Remove before replacing Data.fs.
Data.fs.old
This is backup after Pack.
Data.fs.in
This is initial Data.fs - installation process copy this into Data.fs before starting Zope for the first time.
Data.fs.lock Data.fs.tmp
Temporary files. Feel free to remove them when Zope is not running.
Thanks for clarify that. FYI: I once had a situation where Zope wouldn't start due to corrupted data. But, when I copied the Data.fs file to another installation, everything worked fine. When I tried putting a Data.fs from a fresh installation in place of the corrupted one, Zope still wouldn't start. I finally discovered that deleting the .index file was what it took.
On Thu, Jan 18, 2001 at 10:01:24AM -0600, Marty Stitt wrote:
FYI: I once had a situation where Zope wouldn't start due to corrupted data. But, when I copied the Data.fs file to another installation, everything worked fine. When I tried putting a Data.fs from a fresh installation in place of the corrupted one, Zope still wouldn't start. I finally discovered that deleting the .index file was what it took.
Ah, so there isn't a mechanism that detects invalid .index files. Maybe this should be reported to the COllector, I am sure Jim can come up with a solution. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
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/ ---------------------------------------------
I've just noticed another thing on this 'how to backup Data.fs' issue. Preparing to backup my work, I did a pack, and was then going to archive the resulting Data.fs.old. Because I'd added and deleted a bunch of files earlier today, the Data.fs.old file was 22M in size, and the freshly packed Data.fs was 4M. For example: -rw-r--r-- 1 zope WebAuths 4325257 Jan 18 15:30 Data.fs -rw-r--r-- 1 zope WebAuths 76750 Jan 8 08:43 Data.fs.in -rw-r--r-- 1 zope WebAuths 129950 Jan 17 13:59 Data.fs.index -rw-r--r-- 1 zope WebAuths 4 Jan 9 11:33 Data.fs.lock -rw-r--r-- 1 zope WebAuths 22026222 Jan 17 13:53 Data.fs.old -rw-r--r-- 1 zope WebAuths 188416 Jan 18 15:43 Data.fs.pack -rw-r--r-- 1 zope WebAuths 8656275 Jan 18 15:30 Data.fs.tmp So, I tried running another pack, figuring that the .old file would then be replaced with a copy of the 4M file. But, it remained at 22M. I then deleted the Data.fs.old file, and re-ran the pack. At this point, I noticed that there has been a Data.fs.pack file around, and I don't get a new Data.fs.old. For example: -rw-r--r-- 1 zope WebAuths 4325257 Jan 18 15:30 Data.fs -rw-r--r-- 1 zope WebAuths 76750 Jan 8 08:43 Data.fs.in -rw-r--r-- 1 zope WebAuths 129950 Jan 17 13:59 Data.fs.index -rw-r--r-- 1 zope WebAuths 4 Jan 9 11:33 Data.fs.lock -rw-r--r-- 1 zope WebAuths 4079616 Jan 18 15:43 Data.fs.pack -rw-r--r-- 1 zope WebAuths 8656275 Jan 18 15:30 Data.fs.tmp I'm running 2.2.5, under redhat 7.0. It seems like the idea of running a pack and then archiving Data.fs.old may not always be giving me a valid archive. Should I archive the Data.fs.pack file instead? Oleg Broytmann wrote:
On Thu, 18 Jan 2001, Etienne Labuschagne wrote:
What is the best way to backup Zope's database whithout stopping Zope? When
Pack + backup Data.fs.old.
-- Martin Stitt Chief Software Engineer Esker, Inc. email: marty.stitt@esker.com phone: (608) 273-6000 x331 fax: (608) 273-8227 web: http://www.esker.com
participants (5)
-
Chris Withers -
Etienne Labuschagne -
Martijn Pieters -
Marty Stitt -
Oleg Broytmann