1
0

database-save.sh 377 B

12345678910111213141516
  1. #!/bin/sh
  2. # This script will write a dump file of local user state if you want to splat
  3. # your entire server database and start again but preserve the identity of
  4. # local users and their access tokens.
  5. #
  6. # To restore it, use
  7. #
  8. # $ sqlite3 homeserver.db < table-save.sql
  9. sqlite3 "$1" <<'EOF' >table-save.sql
  10. .dump users
  11. .dump access_tokens
  12. .dump presence
  13. .dump profiles
  14. EOF