Error while restoring backup

View: New views
12 Messages — Rating Filter:   Alert me  

Error while restoring backup

by Christian Weigel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am running into problems restoring a previouly created backup.

The Backup was created on remote machine that has the same setup I have on the machine I am currently working on.

That means - Daisy 2.1, same directories, same users and passwords (as I encountered that the reashing functionality of the backup tool is kind of broken in 2.1).

It seems that there is a problem with the execution of database commands (dropping the currently existing tables). Please find the corresponding error below ...

I also tried using Daisy 2.2 - but the results are the same ( java.io.IOException )

Is this a know problem, maybe a workaround already exists?

Many thanks in advance!

   Christian

----

C:\Daisy\daisyhome\bin>daisy-backup-tool -d C:\Daisy\RepoData\ -r 20080522_000 -l C:\d_backups\

Before restoring a backup, make sure that the repository server
and the Daisy Wiki are not running.

Restoring this backup will undo all changes made since Thu May 22  12:00:01 CEST 2008

Do you wish to restore the backup? [yes|no, default: no]
yes

Restoring backup-20080522_000 ...
Running mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository
java.io.IOException: CreateProcess: mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository error=2
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
        at java.lang.Runtime.exec(Runtime.java:591)
        at java.lang.Runtime.exec(Runtime.java:429)
        at java.lang.Runtime.exec(Runtime.java:326)
        at org.outerj.daisy.backupTool.dbDump.MysqlDbDumper.restore(MysqlDbDumper.java:51)
        at org.outerj.daisy.backupTool.DbBackupEntry.restore(DbBackupEntry.java:50)
        at org.outerj.daisy.backupTool.BackupManager.restore(BackupManager.java:142)
        at org.outerj.daisy.backupTool.BackupTool.restoreBackup(BackupTool.java:205)
        at org.outerj.daisy.backupTool.BackupTool.main(BackupTool.java:98)




_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Paul Focke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm just taking a wild guess here. But it might be because the database
doesn't exist and the backup tool tries to remove it. The process will
then return a exit code 1, which means it failed. try doing a mysqladmin
-u root create daisyrepository to see if it works.

Paul

On Thu, 2008-06-26 at 10:48 +0200, Christian Weigel wrote:

> Hello,
>
> I am running into problems restoring a previouly created backup.
>
> The Backup was created on remote machine that has the same setup I have on the machine I am currently working on.
>
> That means - Daisy 2.1, same directories, same users and passwords (as I encountered that the reashing functionality of the backup tool is kind of broken in 2.1).
>
> It seems that there is a problem with the execution of database commands (dropping the currently existing tables). Please find the corresponding error below ...
>
> I also tried using Daisy 2.2 - but the results are the same ( java.io.IOException )
>
> Is this a know problem, maybe a workaround already exists?
>
> Many thanks in advance!
>
>    Christian
>
> ----
>
> C:\Daisy\daisyhome\bin>daisy-backup-tool -d C:\Daisy\RepoData\ -r 20080522_000 -l C:\d_backups\
>
> Before restoring a backup, make sure that the repository server
> and the Daisy Wiki are not running.
>
> Restoring this backup will undo all changes made since Thu May 22  12:00:01 CEST 2008
>
> Do you wish to restore the backup? [yes|no, default: no]
> yes
>
> Restoring backup-20080522_000 ...
> Running mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository
> java.io.IOException: CreateProcess: mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository error=2
>         at java.lang.ProcessImpl.create(Native Method)
>         at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:30)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
>         at java.lang.Runtime.exec(Runtime.java:591)
>         at java.lang.Runtime.exec(Runtime.java:429)
>         at java.lang.Runtime.exec(Runtime.java:326)
>         at org.outerj.daisy.backupTool.dbDump.MysqlDbDumper.restore(MysqlDbDumper.java:51)
>         at org.outerj.daisy.backupTool.DbBackupEntry.restore(DbBackupEntry.java:50)
>         at org.outerj.daisy.backupTool.BackupManager.restore(BackupManager.java:142)
>         at org.outerj.daisy.backupTool.BackupTool.restoreBackup(BackupTool.java:205)
>         at org.outerj.daisy.backupTool.BackupTool.main(BackupTool.java:98)
>
>
>
>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Parent Message unknown Re: Error while restoring backup

by Christian Weigel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Paul,

I verified that the database(s) exist. They were created during the Wiki Setup (Windows Installer version).

I first thought of a permission problem for the repouser and granted him globally ALL rights. But that sadly didn't solve the problem.

   Christian

>
> From: Paul Focke <paul@...>
>
> I'm just taking a wild guess here. But it might be because the database
> doesn't exist and the backup tool tries to remove it. The process will
> then return a exit code 1, which means it failed. try doing a mysqladmin
> -u root create daisyrepository to see if it works.
>
> Paul

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by karel_vervaeke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There also was an issue with the backup tool if your password contains a
space - this was fixed in subversion and will only be available with the
next Daisy release cycle (2.2).

Karel

On Thu, 2008-06-26 at 13:10 +0200, Paul Focke wrote:

> I'm just taking a wild guess here. But it might be because the database
> doesn't exist and the backup tool tries to remove it. The process will
> then return a exit code 1, which means it failed. try doing a mysqladmin
> -u root create daisyrepository to see if it works.
>
> Paul
>
> On Thu, 2008-06-26 at 10:48 +0200, Christian Weigel wrote:
> > Hello,
> >
> > I am running into problems restoring a previouly created backup.
> >
> > The Backup was created on remote machine that has the same setup I have on the machine I am currently working on.
> >
> > That means - Daisy 2.1, same directories, same users and passwords (as I encountered that the reashing functionality of the backup tool is kind of broken in 2.1).
> >
> > It seems that there is a problem with the execution of database commands (dropping the currently existing tables). Please find the corresponding error below ...
> >
> > I also tried using Daisy 2.2 - but the results are the same ( java.io.IOException )
> >
> > Is this a know problem, maybe a workaround already exists?
> >
> > Many thanks in advance!
> >
> >    Christian
> >
> > ----
> >
> > C:\Daisy\daisyhome\bin>daisy-backup-tool -d C:\Daisy\RepoData\ -r 20080522_000 -l C:\d_backups\
> >
> > Before restoring a backup, make sure that the repository server
> > and the Daisy Wiki are not running.
> >
> > Restoring this backup will undo all changes made since Thu May 22  12:00:01 CEST 2008
> >
> > Do you wish to restore the backup? [yes|no, default: no]
> > yes
> >
> > Restoring backup-20080522_000 ...
> > Running mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository
> > java.io.IOException: CreateProcess: mysqladmin -f --user=repouser --password=PASSWORD -h localhost --port=3306 drop daisyrepository error=2
> >         at java.lang.ProcessImpl.create(Native Method)
> >         at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
> >         at java.lang.ProcessImpl.start(ProcessImpl.java:30)
> >         at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
> >         at java.lang.Runtime.exec(Runtime.java:591)
> >         at java.lang.Runtime.exec(Runtime.java:429)
> >         at java.lang.Runtime.exec(Runtime.java:326)
> >         at org.outerj.daisy.backupTool.dbDump.MysqlDbDumper.restore(MysqlDbDumper.java:51)
> >         at org.outerj.daisy.backupTool.DbBackupEntry.restore(DbBackupEntry.java:50)
> >         at org.outerj.daisy.backupTool.BackupManager.restore(BackupManager.java:142)
> >         at org.outerj.daisy.backupTool.BackupTool.restoreBackup(BackupTool.java:205)
> >         at org.outerj.daisy.backupTool.BackupTool.main(BackupTool.java:98)
> >
> >
> >
> >
> > _______________________________________________
> > daisy community mailing list
> > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> > mail to: daisy@...
> > list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Christian Weigel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Karel,

this is sadly not the case :-(

I had to extract the data manually from the backup now. But this can't be the
solution for the future.

Does anyone know if it's easily possible to restore backups from Version 2.1
to a 2.2 installation, or should one better go for a Export import solution?

Talking about import and export it is not fully clear to me (from reading the
documentation) what the pros and cons of each individual way are. Does anyone
have a common practice example where to use which tool?

Kind Regards,

        Christian

Am Donnerstag, 26. Juni 2008 17:53:33 schrieb Karel Vervaeke:
> There also was an issue with the backup tool if your password contains a
> space - this was fixed in subversion and will only be available with the
> next Daisy release cycle (2.2).
>
> Karel

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by karel_vervaeke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Did you try Paul's suggestion?

Having a quick look at the code I think the problem may also show up if
mysqldump is not in the PATH environment variable.

Karel

On Mon, 2008-06-30 at 13:51 +0200, Christian Weigel wrote:

> Hi Karel,
>
> this is sadly not the case :-(
>
> I had to extract the data manually from the backup now. But this can't be the
> solution for the future.
>
> Does anyone know if it's easily possible to restore backups from Version 2.1
> to a 2.2 installation, or should one better go for a Export import solution?
>
> Talking about import and export it is not fully clear to me (from reading the
> documentation) what the pros and cons of each individual way are. Does anyone
> have a common practice example where to use which tool?
>
> Kind Regards,
>
> Christian
>
> Am Donnerstag, 26. Juni 2008 17:53:33 schrieb Karel Vervaeke:
> > There also was an issue with the backup tool if your password contains a
> > space - this was fixed in subversion and will only be available with the
> > next Daisy release cycle (2.2).
> >
> > Karel
>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Christian Weigel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Karel,

sorry!, I should have answered Paul's message first.

I verified that the databases exist using the mysql shell. The respective
databases and tables were created during the setup process. (I was using the
windows installer (V2.1) installing daisy.

But no - I didn't explicitly create only this the database - Do you think that
it makes a difference from letting the tool try to use the already existing
one?

        Christian

Am Montag, 30. Juni 2008 14:05:05 schrieb Karel Vervaeke:
> Did you try Paul's suggestion?
>
> Having a quick look at the code I think the problem may also show up if
> mysqldump is not in the PATH environment variable.
>
> Karel

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by karel_vervaeke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That does not seem to be the problem then.

Is mysqldump in your path?

On Mon, 2008-06-30 at 14:20 +0200, Christian Weigel wrote:

> Hello Karel,
>
> sorry!, I should have answered Paul's message first.
>
> I verified that the databases exist using the mysql shell. The respective
> databases and tables were created during the setup process. (I was using the
> windows installer (V2.1) installing daisy.
>
> But no - I didn't explicitly create only this the database - Do you think that
> it makes a difference from letting the tool try to use the already existing
> one?
>
> Christian
>
> Am Montag, 30. Juni 2008 14:05:05 schrieb Karel Vervaeke:
> > Did you try Paul's suggestion?
> >
> > Having a quick look at the code I think the problem may also show up if
> > mysqldump is not in the PATH environment variable.
> >
> > Karel
>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Bruno Dumon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, 2008-06-30 at 13:51 +0200, Christian Weigel wrote:
> Hi Karel,
>
> this is sadly not the case :-(
>
> I had to extract the data manually from the backup now. But this can't be the
> solution for the future.

Instructions for restoring a backup are at the bottom of this page:
http://cocoondev.org/daisydocs-2_2/admin/256-cd.html

They're not very detailed (anyone is welcome to improve) but that's the
way it should be done. More specifically, you should not install Daisy
using the installer, as this will initialize a new repository and wiki,
which will conflict (I think) with the data to be restored.

>
> Does anyone know if it's easily possible to restore backups from Version 2.1
> to a 2.2 installation, or should one better go for a Export import solution?

To go from 2.1 to 2.2, you should go for the upgrade procedure, not the
backup or import/export. Upgrading is not yet supported by the Windows
installer AFAIK, you should follow the manual instructions.

>
> Talking about import and export it is not fully clear to me (from reading the
> documentation) what the pros and cons of each individual way are. Does anyone
> have a common practice example where to use which tool?

Import/export and backup are two different things.

Backup works on the database/filesystem level and restores a Daisy
installation like it was before.

Import/export is intended to move documents between repositories, and
works in pretty much the same way as you would enter them through the
wiki. It doesn't preserve version history, modification time and
modifier, it doesn't transfer users or ACL, site configuration, skins,
etc.

--
Bruno Dumon                             http://outerthought.org/
Outerthought                            http://www.daisycms.org/
bruno@...              http://www.kauriproject.org/

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Christian Weigel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Karel,

yes it seems mysqldump is in my path.

I will give it a try reinstalling daisy using the installation manual, not the
automatic installer. Maybe this will let me restore the backup.

 Reading everything together it should be able to restore a backup into a
completely empty mysql database. Is this correct?

        Christian

Am Montag, 30. Juni 2008 14:48:17 schrieb Karel Vervaeke:
> That does not seem to be the problem then.
>
> Is mysqldump in your path?
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by karel_vervaeke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes that is correct.  In fact, what the restore does first is drop the
existing database. Unfortunately, ATM the restore fails if the database
is not there at the beginning

Regards,
KArel

On Mon, 2008-06-30 at 18:59 +0200, Christian Weigel wrote:

> Hi Karel,
>
> yes it seems mysqldump is in my path.
>
> I will give it a try reinstalling daisy using the installation manual, not the
> automatic installer. Maybe this will let me restore the backup.
>
>  Reading everything together it should be able to restore a backup into a
> completely empty mysql database. Is this correct?
>
> Christian
>
> Am Montag, 30. Juni 2008 14:48:17 schrieb Karel Vervaeke:
> > That does not seem to be the problem then.
> >
> > Is mysqldump in your path?
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Error while restoring backup

by Bruno Dumon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, 2008-06-30 at 18:59 +0200, Christian Weigel wrote:
> Hi Karel,
>
> yes it seems mysqldump is in my path.
>
> I will give it a try reinstalling daisy using the installation manual, not the
> automatic installer. Maybe this will let me restore the backup.

Just for extra clarity: you should only extract the Daisy zip, create
the databases and database users, but not follow the remainder of the
installation instructions.

Daisy (the application) doesn't have an installation process as such,
the installation consists of extracting the zip. The remainder of the
installation process is about initializing a data set for Daisy
(database, repo data dir, wiki data dir) but this data is exactly what
you want to restore from the backup.

--
Bruno Dumon                             http://outerthought.org/
Outerthought                            http://www.daisycms.org/
bruno@...              http://www.kauriproject.org/

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy
LightInTheBox - Buy quality products at wholesale price