Sorry, I made a mistake at my first observation.<br><br>Looking at that function (ds_version), it seems the only times $version is actually set is when $v is less than 2.<br><br>While testing backup with blueberry, the number in the version file is always 2 so I keep getting the "Datastore is corrupt" error when I try to view the list of backups in the moodle "Backup" tab.<br>
<br>Below is a copy of the ds_version function as extracted from dsbackuplib.php from our current xs. <br><br><br>function ds_version($dspath) {<br>Â Â Â // determine versin<br>Â Â Â if (file_exists($dspath . '/version')) {<br>
       $v = (int)file_get_contents($dspath . '/version');<br>       if ($v < 2) {<br>           $version = $v;<br>       }<br>   } else if (file_exists($dspath . '/store')) { // file_exists() matches a dir<br>
       $version = 0;<br>   }<br>   if (!isset($version)) {<br>       error("Datastore is corrupt, or has unknown format");<br>   }<br>   return $version;<br>};<br><br><br><br><br><div class="gmail_quote">On Wed, Jan 27, 2010 at 11:46 PM, Martin Langhoff <span dir="ltr"><<a href="mailto:martin.langhoff@gmail.com">martin.langhoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">ds-backup does the right thing for v1 and v2. Anything different than<br>
that is an unknown format. So yes, you are correct :-)<br>
<br>
cheers,<br>
<br>
m<br>
<div><div></div><div class="h5"><br>
On Wed, Jan 27, 2010 at 9:06 AM, Hamilton Chua <<a href="mailto:hamilton.chua@gmail.com">hamilton.chua@gmail.com</a>> wrote:<br>
> Hi Martin.<br>
><br>
> I just wanted to ask what the significance is of the version file in the<br>
> datastore. There is a function ds_version in dsbackuplib.php which<br>
> checks the version number.<br>
><br>
> It seems that if the version is greater than 2 it will always return<br>
> the message "Datastore is corrupt, or has unknown format" in the backup<br>
> tab.<br>
><br>
> The XS is v0.6d5 and I'm using blueberry.<br>
><br>
> Thanks,<br>
><br>
> Hamilton<br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
 <a href="mailto:martin.langhoff@gmail.com">martin.langhoff@gmail.com</a><br>
 <a href="mailto:martin@laptop.org">martin@laptop.org</a> -- School Server Architect<br>
 - ask interesting questions<br>
 - don't get distracted with shiny stuff  - working code first<br>
 - <a href="http://wiki.laptop.org/go/User:Martinlanghoff" target="_blank">http://wiki.laptop.org/go/User:Martinlanghoff</a><br>
</font></blockquote></div><br>