Default replica adaptor The default replica adaptor implements the replica::logical_file and replica::logical_directory CPI's on top of conventional databases. Currently we support the following database backends: - SQLite (V3) - Postgresql V8.x upwards. The database backend has to be configured in the adaptor initialization file (I just provide my ini file contents to convey the idea): #--- --- [saga.adaptors.default_replica] name = default_replica path = ${SAGA_LOCATION}/lib [saga.adaptors.default_replica.preferences] # adaptor configuration # specify what (default) backend to use dbtype = sqlite3 [saga.adaptors.default_replica.preferences.sqlite3] # specify a file name where sqlite3 can store its data. # relative and absolute paths are both supported. Relative paths are # relative to the applications cwd. dbconnect = saga_replica.db [saga.adaptors.default_replica.preferences.postgresql] # The set of parameters used in the dbconnect string # for PostgreSQL is the same as accepted by the PQconnectdb # function from the libpq library (see here: # http://www.postgresql.org/docs/8.1/interactive/libpq.html#LIBPQ-CONNECT) dbconnect = dbname=logocalfiledb;host=fortytwo.cct.lsu.edu;port=5432;user=;password= #--- --- Generally the parameters specified in the dbconnect string are used as defaults, which may be overwritten by different means. Using SQlite3 For SQLite3 the dbtype should be set to 'sqlite3' (case sensitive!). The only parameter which may be specified is the name of the database file to use. If no name is given, 'saga_replica.db' will be used. Using PostgreSQL For PostgreSQL the dbtype has to be set to 'postgresql' (case sensitive!). The set of parameters (and their defaults) used in the dbconnect string for PostgreSQL is the same as accepted by the PQconnectdb function from the libpq library (see here: http://www.postgresql.org/docs/8.1/interactive/libpq.html#LIBPQ-CONNECT). The host, port, username and password parameters given in the connect string may be overwritten either by providing a corresponding saga::context or by specifying these in the URL referring to the replica to access. If no dbname parameter is given in the dbconnect string, replicadb is used. If no host is given, localhost is used. The default port number is 5432. The user credentials default to anonymous/anon. The database backend to use may be overwritten by specifying a '?dbtype=sqlite3' or '?dbtype=postgresql' query parameter in the url. The file replicadb.postgresql.dump contains a full database dump usable to create a new database.