[Server-devel] question about ds_version in dsbackuplib.php
Hamilton Chua
hamilton.chua at gmail.com
Wed Jan 27 11:46:04 EST 2010
Sorry, I made a mistake at my first observation.
Looking at that function (ds_version), it seems the only times $version is
actually set is when $v is less than 2.
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.
Below is a copy of the ds_version function as extracted from dsbackuplib.php
from our current xs.
function ds_version($dspath) {
// determine versin
if (file_exists($dspath . '/version')) {
$v = (int)file_get_contents($dspath . '/version');
if ($v < 2) {
$version = $v;
}
} else if (file_exists($dspath . '/store')) { // file_exists() matches a
dir
$version = 0;
}
if (!isset($version)) {
error("Datastore is corrupt, or has unknown format");
}
return $version;
};
On Wed, Jan 27, 2010 at 11:46 PM, Martin Langhoff <martin.langhoff at gmail.com
> wrote:
> ds-backup does the right thing for v1 and v2. Anything different than
> that is an unknown format. So yes, you are correct :-)
>
> cheers,
>
> m
>
> On Wed, Jan 27, 2010 at 9:06 AM, Hamilton Chua <hamilton.chua at gmail.com>
> wrote:
> > Hi Martin.
> >
> > I just wanted to ask what the significance is of the version file in the
> > datastore. There is a function ds_version in dsbackuplib.php which
> > checks the version number.
> >
> > It seems that if the version is greater than 2 it will always return
> > the message "Datastore is corrupt, or has unknown format" in the backup
> > tab.
> >
> > The XS is v0.6d5 and I'm using blueberry.
> >
> > Thanks,
> >
> > Hamilton
> >
> >
> >
> >
>
>
>
> --
> martin.langhoff at gmail.com
> martin at laptop.org -- School Server Architect
> - ask interesting questions
> - don't get distracted with shiny stuff - working code first
> - http://wiki.laptop.org/go/User:Martinlanghoff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/server-devel/attachments/20100128/3c6af963/attachment.htm
More information about the Server-devel
mailing list