This page will hopefully one day have all the info you need to make decent backups of your databases and files. The two methods described below, for MySQL and PostgreSQL, will dump sensitive user information as well, so be careful who you give your backups to!
For a usable neat little wiki export, see the export page.
MySQL database backup
mysqldump -u username -pPASSWORD -h mysql.mydomain.com my_sycamore_db > my_sycamore_db.sql
This will dump all the tables but none of the tables that end in Changes because they have the table type of VIEW.
To restore from this backup I am using phpmyadmin to run the sql file this generates.
You will also need to run the CREATE VIEW code from your sycamore/buildDB.py file. Search for if config.db_type == 'mysql' around line 559, then copy and run those SQL queries on your database.
I noticed that some of the pages would render with errors after I used a database I just restored. Running the Sycamore maintenance and choosing Rebuild all page caches seemed to clear that up.
I'll try and add the command line info later.
PostgreSQL database backup
pg_dump my_sycamore_db > my_sycamore_db.sql
This will dump everything!
SQLite database backup
cp sycamore_dir/share/data/wiki.db your/new/location/wiki.db
:) SQLite uses just a single file for the whole database.
In the future we'd like to have a backup that uses python to dump to a standard format (and import, as well). XML might be fine for this purpose.
An Export function is currently being investigated.