Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 81454 invoked from network); 8 Jul 2008 08:28:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2008 08:28:57 -0000 Received: (qmail 62101 invoked by uid 500); 8 Jul 2008 08:28:57 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 62071 invoked by uid 500); 8 Jul 2008 08:28:57 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 62060 invoked by uid 99); 8 Jul 2008 08:28:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 01:28:57 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.192.107.220] (HELO bonito.coloflorida.com) (66.192.107.220) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 08:28:02 +0000 Received: from mackerel.coloflorida.com (66.192.107.221) by bonito.coloflorida.com (66.192.107.220) with Microsoft SMTP Server (TLS) id 8.1.278.0; Tue, 8 Jul 2008 04:29:32 -0400 Received: from EVS-RED.coloflorida.com ([66.192.107.214]) by mackerel.coloflorida.com ([66.192.107.221]) with mapi; Tue, 8 Jul 2008 04:29:32 -0400 From: Andrew Lawrenson To: Derby Discussion Date: Tue, 8 Jul 2008 04:28:21 -0400 Subject: RE: Backing up transactions logs Thread-Topic: Backing up transactions logs Thread-Index: Acja8W3GPvn8KzRES7KXO0QbPDINAAF4nYQg Message-ID: <882C3355DFF9D3468379DD1E8C115FC71487FB341A@EVS-RED.coloflorida.com> References: <18203847.post@talk.nabble.com> In-Reply-To: <18203847.post@talk.nabble.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org What's worked for me (although anyone else feel free to correct me) is: 1) checkpoint the database by running SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE(= ) 2) freeze the database by running SYSCS_UTIL.SYSCS_FREEZE_DATABASE() 3) copy your log files (_all_ files in log dir) 4) unfreeze the database by running SYSCS_UTIL.SYSCS_UNFREEZE_DATABASE() #1 will flush cached data to disk #2 will ensure that no write activity is taking place whilst you copy the f= iles, so all should be consistent. Andy -----Original Message----- From: aspect1958 [mailto:gevans@debshops.com] Sent: 30 June 2008 21:38 To: derby-user@db.apache.org Subject: Backing up transactions logs My issue is that I am trying to create a backup procedure that would limit = my data loss exposure. Currently a complete backup is performed each morning at 4:30am SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE('BackupDir',1) The logs reside in the database under logs. On the hour I am using system commands to copy the logs with the archive flag set and the logctrl file, to the BackupDir/logs directory. On the theory that my exposure to a disk crash is limited to 1 hour. But when ever I attempt to recover the database with roll forward with "rol= lForwardRecoveryFrom=3D'BackupDir' I get a message like; Page Page(9,Container(0, 144)) is at version 2,613,545, the log file conta= ins change version 2,621,080, either there are log records of this page mis= sing, or this page did not get written out to disk properly. ij version 10.2 Is this a difference between the actual logs and the logctrl? Is my only other option to move the log file location to 'BackupDir' Thanks for any thoughts on this. -- View this message in context: http://www.nabble.com/Backing-up-transactions= -logs-tp18203847p18203847.html Sent from the Apache Derby Users mailing list archive at Nabble.com.