Emmanuel Blot wrote:
To backup:
sqlite your_db_file '.dump wiki' > wikibackup.sql
To restore:
sqlite your_db_file < wikibackup.sql
To head off one possible source of confusion: Depending on your Trac version
you may need to use sqlite3 (comes as a separate package on my Debian system,
anyway). Trying to dump a trac 0.9.3 DB with the sqlite command-line tool fails.
I find easier to always backup the DB as a whole (and filter out the
unwanted statements - if any - at restoration time). I simply discard
the session and auth_cookie table, using grep:
grep -Ev "^INSERT INTO session|auth_cookie VALUES"
I hadn't considered the session/auth tables until I read this. I do full dump
of the project DBs prior to archiving. Thankfully I haven't had to restore
one yet, but I assume I'd be opening up a security hole and a half by
restoring these tables? (especially considering a theoretical situation where
an authenticated user was responsible for the damage in the first place...)
HTH,
Manu
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac