20120707

RT: ruta de BD SQLite - RT: SQLite database path

Estamos en proceso de análisis de varias herramientas de helpdesk para implantar una de ellas en la organización y así aprovecharnos de las múltiples ventajas de su uso.
Una de las que estamos probando es RT: Request Tracker una herramienta muy sencilla y a la vez muy configurable. Para hacer pruebas y como la aplicación lo permitía la hemos instalado con SQLite como backend, aunque también permite el uso de Oracle, MySQL y PostgreSQL.
La cosa es que para hacer pruebas con la primera era suficiente y como en casi todas las pruebas, muchas veces queremos volver al estado inicial de la BDD sin tener que reinstalar o tirar de snapshots. Para ello, lo que hemos hecho ha sido copiar el fichero de SQLite, cuya ubicación podemos conocer, por ejemplo, del siguiente modo:
1.- Miramos en el fichero de configuración de la herramienta.
2.- Listamos el contenido del directorio.
3.- Comprobamos que se trata de un fichero SQLite.


We're analyzing some helpdesk tools to deploy one of them to help us tracking the issues on our company.
One of them is RT: Request Tracker, a very very simple and customizable tool wich can be configured with Oracle, MySQL, PostgreSQL and SQLite as backend. To make our tests with it we're using SQLite and to start from scratch during these tests we have to know where the database file is stored and back it up. We can find it following these easy steps:
1.- Have a look on the tool configuration file.
2.- List the directory
3.- Check if is a SQLite file.

bdispatcher@server:~$ sudo cat /etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common
# THE DATABASE:
# generated by dbconfig-common

# map from dbconfig-common database types to their names as known by RT
my %typemap = (
    mysql   => 'mysql',
    pgsql   => 'Pg',
    sqlite3 => 'SQLite',
);
 
Set($DatabaseType, $typemap{sqlite3} || "UNKNOWN");

Set($DatabaseHost, 'localhost');
Set($DatabasePort, '');

Set($DatabaseUser , '');
Set($DatabasePassword , '');

# SQLite needs a special case, since $DatabaseName must be a full pathname
my $dbc_dbname = 'rtdb'; if ( "sqlite3" eq "sqlite3" ) { Set ($DatabaseName, '/var/lib/dbconfig-common/sqlite3/request-tracker4' . '/' . $dbc_dbname); } else { Set ($DatabaseName, $dbc_dbname); }
bdispatcher@server:~$ sudo ls -l /var/lib/dbconfig-common/sqlite3/request-tracker4
total 88
-rw-rw---- 1 root www-data 90112 jul  2 12:30 rtdb

bdispatcher@server:~$ sudo file /var/lib/dbconfig-common/sqlite3/request-tracker4/rtdb
/var/lib/dbconfig-common/sqlite3/request-tracker4/rtdb: SQLite 3.x database
bdispatcher@server:~$

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

No hay comentarios: