Re: [ZODB-Dev] Remember date of last pack?
On 07/26/2010 09:14 AM, Christian Zagrodnick wrote: > for monitoring if a storage has been packed it would be handy if it > remembered the date of its last pack. An easy solution for file storage > would be to create a Data.fs.packed file. FWIW, with RelStorage, a simple query of the "transaction" table should do the trick. Shane ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Remember date of last pack?
On Mon, Jul 26, 2010 at 8:12 PM, Christian Zagrodnick wrote: > On 2010-07-26 17:38:10 +0200, Hanno Schlichting said: >> - Configure repozo to do incremental backups and keep some old >> backups. Configure zeopack to run regularly. Check that you have a >> recent full repozo backup around, which gets created automatically >> once you do a pack. > > I don't understand how that helps that the database was packed. If > *course* there is an automatic job to pack the database. But that > doesn't necessarily mean that it works. Hence a *test* to monitor that > the database was packed. In this configuration repozo only creates a full backup, if the database is packed. Otherwise you will only get incremental backups. Repozo already does check of the database file to see if it was packed (by comparing the actual data inside the database file). This way you are just reusing this information instead of incurring any extra cost. Hanno ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Remember date of last pack?
On 2010-07-26 17:38:10 +0200, Hanno Schlichting said: > On Mon, Jul 26, 2010 at 5:14 PM, Christian Zagrodnick wrote: >> for monitoring if a storage has been packed it would be handy if it >> remembered the date of its last pack. An easy solution for file storage >> would be to create a Data.fs.packed file. >> >> Other ways do determine the date would be: >> >> - Use age of Data.fs.old: very implicit; file is not available during >> packing (thus monitoring becomes difficult); it is not required to keep >> Data.fs.old >> - Provide a wrapper script around zeopack which stores the information: >> while that would work it is rather tedious to provide that again and >> again for each buildout/installation. > > - Configure repozo to do incremental backups and keep some old > backups. Configure zeopack to run regularly. Check that you have a > recent full repozo backup around, which gets created automatically > once you do a pack. I don't understand how that helps that the database was packed. If *course* there is an automatic job to pack the database. But that doesn't necessarily mean that it works. Hence a *test* to monitor that the database was packed. -- Christian Zagrodnick · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Remember date of last pack?
On 2010-07-26 17:36:37 +0200, Jim Fulton said: > On Mon, Jul 26, 2010 at 11:14 AM, Christian Zagrodnick > wrote: >> Hi, >> >> for monitoring if a storage has been packed it would be handy if it >> remembered the date of its last pack. An easy solution for file storage >> would be to create a Data.fs.packed file. >> >> Other ways do determine the date would be: >> >> - Use age of Data.fs.old: very implicit; file is not available during >> packing (thus monitoring becomes difficult); it is not required to keep >> Data.fs.old >> - Provide a wrapper script around zeopack which stores the information: >> while that would work it is rather tedious to provide that again and >> again for each buildout/installation. >> >> Comments? > > ZEO servers log when databases are packed. I often look at the ZEO > logs to verify that databases have been packed. Sure. I was talking about automatic monitoring, though. That implies a rather cheap and simple way to determine the value to be checked. > > File-storage packed database records have a status flag of "p", so you > can determine the approximate (depending on how active your database > is) date of last pack by scanning the transaction headers. That sounds rather expensive. But then I don't know too much about that. -- Christian Zagrodnick · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Remember date of last pack?
On Mon, Jul 26, 2010 at 5:14 PM, Christian Zagrodnick wrote: > for monitoring if a storage has been packed it would be handy if it > remembered the date of its last pack. An easy solution for file storage > would be to create a Data.fs.packed file. > > Other ways do determine the date would be: > > - Use age of Data.fs.old: very implicit; file is not available during > packing (thus monitoring becomes difficult); it is not required to keep > Data.fs.old > - Provide a wrapper script around zeopack which stores the information: > while that would work it is rather tedious to provide that again and > again for each buildout/installation. - Configure repozo to do incremental backups and keep some old backups. Configure zeopack to run regularly. Check that you have a recent full repozo backup around, which gets created automatically once you do a pack. Hanno ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Remember date of last pack?
On Mon, Jul 26, 2010 at 11:14 AM, Christian Zagrodnick wrote: > Hi, > > for monitoring if a storage has been packed it would be handy if it > remembered the date of its last pack. An easy solution for file storage > would be to create a Data.fs.packed file. > > Other ways do determine the date would be: > > - Use age of Data.fs.old: very implicit; file is not available during > packing (thus monitoring becomes difficult); it is not required to keep > Data.fs.old > - Provide a wrapper script around zeopack which stores the information: > while that would work it is rather tedious to provide that again and > again for each buildout/installation. > > Comments? ZEO servers log when databases are packed. I often look at the ZEO logs to verify that databases have been packed. File-storage packed database records have a status flag of "p", so you can determine the approximate (depending on how active your database is) date of last pack by scanning the transaction headers. Jim -- Jim Fulton ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
[ZODB-Dev] Remember date of last pack?
Hi, for monitoring if a storage has been packed it would be handy if it remembered the date of its last pack. An easy solution for file storage would be to create a Data.fs.packed file. Other ways do determine the date would be: - Use age of Data.fs.old: very implicit; file is not available during packing (thus monitoring becomes difficult); it is not required to keep Data.fs.old - Provide a wrapper script around zeopack which stores the information: while that would work it is rather tedious to provide that again and again for each buildout/installation. Comments? -- Christian Zagrodnick · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev