REDISQL.CREATE_DB $DB_NAME [$path]take the optional argument $path. If a path is provided, RediSQL try to open an SQLite database from the specified path. If the file does not exists, it creates a new database. If the file is a SQLite database, the database, with all its data, is loaded into RediSQL. If the file is not a SQLite database, a simple error is raised.
REDISQL.CREATE_DBcommand as path argument. This will create a file-backend database with already all your data loaded.
REDISQL.COPY $source $destinationtakes as argument a
$sourcedatabase and a
$destinationdatabase, creating a copy of the
$sourcedatabase into the
$destinationdatabase is overwritten and its content is lost.
inputdatabase is a file-backend database using our original SQLite database while the
fast_productionis a memory-backend database. Then we copy the content of
fast_productiondatabase that will have all the data in the original
productionis a memory-backend database used during normal operatios,
copyis a file-backend database used for backup. Then we copy the database from
copydatabase, the file will stay intact in the filesystem, but the database won't use any more resorces from Redis. The database can be deleted using the standard
REDISQL.COPYcommand has also different uses, it can be used to create a stale copy of a database to distribute some traffic. Or it can be used to create a complex structure in a "template" database and quickly replicate the template for different users.