Page:
database backup
Pages
0x_id
API
Configuration
Customization
DatabaseUpdate
Docker
GoogleMapsAPI
Home
IMDb
MultilingualAnnotations
MultipleAudioTracks
MyFavoriteBugs
Places
QuerySyntax
RenamingFiles
UpgradeTo14.04
UpgradeTo16.04
UpgradeTo18.04
UpgradeTo20.04
UpgradeToPython3
UseCases
WikipediaTemplate
config
database backup
embed
filenames
groups
ids
install
ldap
media
metadata
objects
permissions
posterservice
services
shell
ssl
text
todo
urls
video
volume
No results
2
database backup
j edited this page 2023-07-07 11:50:49 +00:00
Table of Contents
Pan.do/ra database backup
the following commands can be used to backup and restore the postgres database used by pan.do/ra:
as pandora user:
mkdir -p /srv/pandora/database
pg_dump pandora | gzip > /srv/pandora/database/pandora-`date -I`.psql.gz
Restore database from backup:
If needed create postgres db:
sudo -u postgres createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora
echo "CREATE EXTENSION pg_trgm;" | sudo -u postgres psql pandora
load db from backup as pandora user
zcat /srv/pandora/database/pandora-2023-06-07.psql.gz | pandoractl manage dbshell