File: database-save.sh

package info (click to toggle)
matrix-synapse 1.146.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,992 kB
  • sloc: python: 261,671; javascript: 7,230; sql: 4,758; sh: 1,302; perl: 626; makefile: 207
file content (15 lines) | stat: -rwxr-xr-x 362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# This script will write a dump file of local user state if you want to splat
# your entire server database and start again but preserve the identity of
# local users and their access tokens.
#
# To restore it, use
#
#   $ sqlite3 homeserver.db < table-save.sql

sqlite3 "$1" <<'EOF' >table-save.sql
.dump users
.dump access_tokens
.dump profiles
EOF