Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/deploy/restore.sh

13 lignes
384 B
Bash
Fichiers exécutables

#!/bin/bash
# Restore the database from a postgres dump
pg_restore --username "${POSTGRES_USER}" -d ${POSTGRES_DB} "/${PANTSU_POSTGRES_DBFILE}"
last_nyaa_torrent_id=923001
# Setting the sequence to start from after the latest nyaa torrent.
psql -U postgres "${POSTGRES_DB}" <<EOF
alter sequence torrents_torrent_id_seq start
${last_nyaa_torrent_id} restart
EOF