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.langh...@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.c...@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.langh...@gmail.com
>  mar...@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
>
_______________________________________________
Server-devel mailing list
server-de...@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel

Reply via email to