5 mv /home/plom/peertube_backup.tar /tmp/
7 tar xf peertube_backup.tar
8 cp -a peertube_backup/storage/* /var/www/peertube/storage/
9 cp -a peertube_backup/config/* /var/www/peertube/config/
10 su postgres -c 'pg_restore -c -C -d postgres peertube_backup/peertube_prod-dump.db'
12 db_pw=$(cat /var/www/peertube/config/production.yaml | grep password | head -1 | sed "s/[ ]*password\: *//g" | sed "s/'//g")
13 su postgres -lc "psql -c \"ALTER USER peertube WITH PASSWORD '${db_pw}';\""
15 service peertube start