File: database-save.sh

package info (click to toggle)
matrix-synapse 1.143.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,852 kB
  • sloc: python: 258,912; javascript: 7,330; sql: 4,733; sh: 1,281; 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