My backup.sql file is showing as 0 bytes. Is this correct?

1,127 views
Skip to first unread message

Joseph

unread,
Jun 12, 2017, 7:38:55 AM6/12/17
to webanno-user
I have finally managed to get mysql to dump my webanno database, however it shows as 0 bytes. As my server isn't working, I was wondering whether the backup contains nothing, or whether it says it is 0 bytes because the file is unknown. Should it be >0 bytes?

Many Thanks,
J

Richard Eckart de Castilho

unread,
Jun 12, 2017, 7:45:39 AM6/12/17
to Joseph, webanno-user
On 12.06.2017, at 13:38, Joseph <josephw...@gmail.com> wrote:
>
> I have finally managed to get mysql to dump my webanno database, however it shows as 0 bytes. As my server isn't working, I was wondering whether the backup contains nothing, or whether it says it is 0 bytes because the file is unknown. Should it be >0 bytes?

I think that even for an empty MySQL, a database dump should be larger than 0 bytes (containing at least some comments).

-- Richard

Joseph

unread,
Jun 12, 2017, 7:51:16 AM6/12/17
to webanno-user, josephw...@gmail.com
That's what I thought... This most likely explains why my server isn't working. When I show all databases in mysql I get
  • information_schema
  • mysql
  • performance_schema
  • webanno
I assume the top three are created by default as I only use WebAnno in mysql. Is it possible to somehow check the contents of the database without using WebAnno directly?

Luca Toldo

unread,
Jun 12, 2017, 7:55:43 AM6/12/17
to webanno-user, josephw...@gmail.com
Dear Joseph,
you can check the status of the database by
a) connecting to the database (e.g. mysql ... webanno)  and then giving the command "show tables"
b) connect to the machine running the database and then look if in the data directory under webanno there are some files ...
re you on some sort of *nix ?

Joseph

unread,
Jun 12, 2017, 8:14:06 AM6/12/17
to webanno-user, josephw...@gmail.com


On Monday, 12 June 2017 12:55:43 UTC+1, Luca Toldo wrote:
Dear Joseph,
you can check the status of the database by
a) connecting to the database (e.g. mysql ... webanno)  and then giving the command "show tables"
b) connect to the machine running the database and then look if in the data directory under webanno there are some files ...
re you on some sort of *nix ?

a) I have 17 rows, so the database isn't empty.
 annotation_document             
 annotation_feature              
 annotation_type                 
 authorities                      
 auto_stat                        
 constraint_set                   
 crowd_job                        
 crowd_job_gold_document          
 crowd_job_source_document        
 mira_template                    
 mira_template_annotation_feature 
 project                          
 project_permissions              
 source_document                  
 tag                              
 tag_set                          
 users 

b) Which file is the data directory? In /srv/webanno/respository/project, I ave 6 folders and 6 project logs. Each project has all the settings and document folders you'd expect, so everything is there.

Thanks,
J
 

Joseph

unread,
Jun 12, 2017, 8:17:27 AM6/12/17
to webanno-user, josephw...@gmail.com


On Monday, 12 June 2017 12:55:43 UTC+1, Luca Toldo wrote:
Dear Joseph,
you can check the status of the database by
a) connecting to the database (e.g. mysql ... webanno)  and then giving the command "show tables"
b) connect to the machine running the database and then look if in the data directory under webanno there are some files ...
re you on some sort of *nix ?

I am using Debian GNU/Linux 8 (jessie) 64-bit, if that is what you meant.
 

Luca Toldo

unread,
Jun 12, 2017, 9:43:31 AM6/12/17
to webanno-user, josephw...@gmail.com
Dear Joseph,
then indeed something went wrong gin the dump ... .

Joseph

unread,
Jun 12, 2017, 11:17:47 AM6/12/17
to webanno-user, josephw...@gmail.com
Below is what comes up when I type in "\s" after logging into mysql. Where it says 'Current database: ____', is it possible my server may not be working because it is not loading a database? Perhaps whilst dumping my webanno database it is not connecting to it anymore?
 
Connection id: 53
Current database:                           
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.54-0+deb8u1 (Debian)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db     characterset: latin1
Client characterset: utf8
Conn.  characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock

Joseph

unread,
Jun 13, 2017, 6:15:48 AM6/13/17
to webanno-user, josephw...@gmail.com
I finally managed to dump my webanno database with a value >0kb, it's 832kb. Does this seem right for 3 projects, each with 600 documents, where each document contains 5 lines of plain text? 

Many Thanks,
J

Richard Eckart de Castilho

unread,
Jun 13, 2017, 6:24:17 AM6/13/17
to Joseph, webanno-user
On 13.06.2017, at 12:15, Joseph <josephw...@gmail.com> wrote:
>
> I finally managed to dump my webanno database with a value >0kb, it's 832kb. Does this seem right for 3 projects, each with 600 documents, where each document contains 5 lines of plain text?

The document text is not stored in the database. The texts and annotations are stored as files.
It seems a bit much but it might just be MySQL generating verbose comments.

How about you open the file and look at its contents? It should basically be a plaintext file with SQL commands.

-- Richard

Joseph

unread,
Jun 13, 2017, 6:39:57 AM6/13/17
to webanno-user, josephw...@gmail.com
I thought I couldn't open it, sorry my fault. It looks similar to an example I saw online, which can only be a good thing. I can see references to one of the tagsets and users created so that's good. A lot of it is the documents name, then 'INPROGRESS' etc, so I assume that's documents or files which haven't been annotated. Seems it has worked after all. To restore webanno completely from scratch or after a fresh install, do you need to reimport this backup, plus the project files in: srv/webanno/respository/project/(project files and log files)?

Many Thanks!
J

Richard Eckart de Castilho

unread,
Jun 13, 2017, 7:45:37 AM6/13/17
to Joseph, webanno-user
On 13.06.2017, at 12:39, Joseph <josephw...@gmail.com> wrote:
>
> I thought I couldn't open it, sorry my fault. It looks similar to an example I saw online, which can only be a good thing. I can see references to one of the tagsets and users created so that's good. A lot of it is the documents name, then 'INPROGRESS' etc, so I assume that's documents or files which haven't been annotated. Seems it has worked after all. To restore webanno completely from scratch or after a fresh install, do you need to reimport this backup, plus the project files in: srv/webanno/respository/project/(project files and log files)?

A full backup includes the database dump plus the files from the WebAnno home dir (e.g. /srv/webanno), yes.

-- Richard

Joseph

unread,
Jun 13, 2017, 8:03:24 AM6/13/17
to webanno-user, josephw...@gmail.com
Great, so if I just copy the srv folder to another location I have a full backup. 
The easiest way for me to fix my problems is probably... by reinstalling/setting up webanno from scratch. Before I do that, is there anything I need to do to remove the old set up or change/remove mysql or my tomcat instance so I can start again? I was hoping i could just follow the instructions again, but remove the install XXX commands as i have java, mysql and tomcat installed already.

Thanks again,
J

Richard Eckart de Castilho

unread,
Jun 15, 2017, 5:28:54 AM6/15/17
to Joseph, webanno-user
On 13.06.2017, at 14:03, Joseph <josephw...@gmail.com> wrote:
>
> Great, so if I just copy the srv folder to another location I have a full backup.
> The easiest way for me to fix my problems is probably... by reinstalling/setting up webanno from scratch. Before I do that, is there anything I need to do to remove the old set up or change/remove mysql or my tomcat instance so I can start again? I was hoping i could just follow the instructions again, but remove the install XXX commands as i have java, mysql and tomcat installed already.

If you use different names for the webanno home folder, tomcat instance and database then you did the first time, then you could leave the old setup around. Otherwise, you should rename/delete the tomcat, DB, and webanno home that you had set up previously.

-- Richard

Joseph

unread,
Jun 15, 2017, 7:12:24 AM6/15/17
to webanno-user, josephw...@gmail.com
That sounds like a very good idea. So when I am preparing the mysql database, creating the tomcat instance and deploying the WAR file, replace all mentions of 'webanno' with 'webanno2'? Is there anything I don't need to change from 'webanno'?
e.g:
$ cd /opt
$ tomcat8-instance-create -p 18080 -c 18005 webanno2
$ chown -R www-data /opt/webanno2
Many Thanks!
J

Richard Eckart de Castilho

unread,
Jun 15, 2017, 7:51:47 AM6/15/17
to Joseph, webanno-user

> On 15.06.2017, at 13:12, Joseph <josephw...@gmail.com> wrote:
>
> That sounds like a very good idea. So when I am preparing the mysql database, creating the tomcat instance and deploying the WAR file, replace all mentions of 'webanno' with 'webanno2'? Is there anything I don't need to change from 'webanno'?
> e.g:
> $ cd /opt
> $ tomcat8-instance-create -p 18080 -c 18005 webanno2
> $ chown -R www-data /opt/webanno2

I don't know if there is any "webanno" that doesn't need to be changed.
You'll see when you try it.

-- Richard

Joseph

unread,
Jun 15, 2017, 8:20:55 AM6/15/17
to webanno-user, josephw...@gmail.com
Thanks a lot for your help. I thought about creating another Debian partition to test the backup of the database and projects but this way will (hopefully) be much quicker.

J
Reply all
Reply to author
Forward
0 new messages