Where is the database

Hi there,
I have installed seicomp3 in /home//seiscomp3
in an acquisition machine.
I have the sql database on /home//seiscomp3/share/db
but if i do
ls -lh /home//seiscomp3/share/db
-rw-r–r--. 1 sysop sysop 61K Feb 11 10:16 mysql.sql
-rw-r–r--. 1 sysop sysop 73K Feb 11 10:16 postgres.sql
-rw-r–r--. 1 sysop sysop 69K Feb 11 10:16 sqlite3.sql

Then, I have a database of about 61KB !!
The size is so little!

So, is it the database real in use???
Someone know something about the position of the real database in use?

Thank’s a lot

Then, I have a database of about 61KB !!
The size is so little!

Have you looked what’s inside? :wink:

You might also wand to look under /var/lib/mysql

Thank you! :grin:

Then, if I want to backup the database, which files I need to backup?
only the /var/lib/mysql/seiscomp3 directory?

Using mysql database

Back-up database

WARNING : the following might affect database access, watch ~/.seiscomp3/log/scmaster.log.

mysqldump -u sysop -p --all-databases --lock-tables=false |pbzip2 -c > database-`/bin/date +"%Y-%m-%d"`.sql.bz2 

Note: Use --lock-tables=false instead of --skip-lock-tables depending on versions.

Regenerate backed-up database

  • Start mysql:
apt-get install mysql-server
/etc/init.d/mysql start
  • Upload the data:
bunzip2 -c database.sql.bz2|mysql -u sysop -p