<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Testing backUp SQL Anywhere 10 in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820947#M4851790</link>
    <description>&lt;P&gt;TBH I neither have reason to distrust DBBACKUP nor I have good idea how to test backup and running databases for equality (I know that database backup is more complex then file copy :)).&lt;/P&gt;
&lt;P&gt;AFAIK .DB and .LOG files timestamps change when they are extended and on database shutdown.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2010 14:08:49 GMT</pubDate>
    <dc:creator>former_SQLA_member1694880</dc:creator>
    <dc:date>2010-04-12T14:08:49Z</dc:date>
    <item>
      <title>Testing backUp SQL Anywhere 10</title>
      <link>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaq-p/13820945</link>
      <description>&lt;P&gt;From: "Claude" &lt;/P&gt;

&lt;P&gt;Newsgroups: sybase.public.sqlanywhere.general&lt;/P&gt;

&lt;P&gt;Subject: BackUp SYB 10&lt;/P&gt;

&lt;P&gt;Date: 9 Apr 2010 23:49:23 -0700&lt;/P&gt;

&lt;P&gt;I used to do the backup of SYB 10 with DBBAckup, but after stopping the DB 
( script netstop db, dbbackup, netstart db )&lt;/P&gt;

&lt;P&gt;I am currently testing the "warm" backup, ie dbbackup without stopping the 
DB.&lt;/P&gt;

&lt;P&gt;I am supprised to see that , if I run this backup now, I find the db and log 
files with dates in the past, and different for db and log.
The DB date can be dated 2 days ago, and the log 1 day ago.
Is this normal, How can I be sure that this backup is correct, and includes 
the latest transacations done?&lt;/P&gt;

&lt;P&gt;Claude&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2010 10:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaq-p/13820945</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2010-04-12T10:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Testing backUp SQL Anywhere 10</title>
      <link>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820946#M4851789</link>
      <description>&lt;BLOCKQUOTE&gt;
  &lt;P&gt;I used to do the backup of SYB 10 with DBBAckup, but after stopping the 
  DB ( script netstop db, dbbackup, netstart db )&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;What did the connection string look like on the dbbackup command line? Did it use a DSN with autostart specified?&lt;/P&gt;

&lt;P&gt;The reason I ask is that the dbbackup.exe &lt;STRONG&gt;only&lt;/STRONG&gt; does warm backups; i.e., it &lt;STRONG&gt;only&lt;/STRONG&gt; connects to a running database, so in order for it to work on a stopped database it would have to autostart it... then, if the DSN also specified autostop, the database engine would stop when dbbackup was finished thus allowing the netstart to work.&lt;/P&gt;

&lt;P&gt;If that's not the explanation, then I certainly want to hear about it! ( I can feel the ground shifting 'neath my feet &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The OS file system datetime for the *.db and *.log files is &lt;STRONG&gt;not&lt;/STRONG&gt; changed every time data is written to the files. I can't remember what exactly the rules are, but AFAIK if the files change in size then the datetime is updated. Variations in the file datetimes are very common and of no concern... do not rely on those datetimes for anything.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;How can I be sure that this backup is correct, and includes the latest transacations done?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Dmitri answered "trust it" in the newsgroup... and initially I thought that was too glib but I'm having a hard time coming up with a better answer, such as a test you could perform after every backup.&lt;/P&gt;

&lt;P&gt;( in practice, glib or not, Dmitri's answer works for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Anyway, here's one possibility, probably best suited for a one-time test: Create a test table and insert a row with COMMIT just before doing the backup. After the backup is complete, start the backup database using the backup log, in the backup folder; specify a different -n server name on the dbeng10 command line to avoid conflicts. The database start process will go through normal "recovery" to apply the log to the database. Then, do a query to make sure the test row is there.&lt;/P&gt;

&lt;P&gt;You could do a test with two inserted rows, one committed and the second one not. After the backup database is started, only the first row should be there because the second row was not committed... that is expected behavior: the original connection that did the uncommitted insert does not exist on the backup database so the intent (commit or rollback) is unknown, therefore rollback must be assumed.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2010 10:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820946#M4851789</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2010-04-12T10:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Testing backUp SQL Anywhere 10</title>
      <link>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820947#M4851790</link>
      <description>&lt;P&gt;TBH I neither have reason to distrust DBBACKUP nor I have good idea how to test backup and running databases for equality (I know that database backup is more complex then file copy :)).&lt;/P&gt;
&lt;P&gt;AFAIK .DB and .LOG files timestamps change when they are extended and on database shutdown.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2010 14:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820947#M4851790</guid>
      <dc:creator>former_SQLA_member1694880</dc:creator>
      <dc:date>2010-04-12T14:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Testing backUp SQL Anywhere 10</title>
      <link>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820948#M4851791</link>
      <description>&lt;P&gt;Which db &amp;amp; log file have old dates: the backup files or the ones that are currently in use by the server? I would expect the former (ie the backup files) to have a current timestamp and the latter could, as Breck has explained, appear to have old timestamps.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2010 15:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/testing-backup-sql-anywhere-10/qaa-p/13820948#M4851791</guid>
      <dc:creator>johnsmirnios</dc:creator>
      <dc:date>2010-04-12T15:39:37Z</dc:date>
    </item>
  </channel>
</rss>

