Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos
Commits
3aadd960
Commit
3aadd960
authored
Nov 24, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: backup fixup
parent
7f746f93
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
15 deletions
+7
-15
software/backupserver/instance-pullrdiffbackup.cfg.in
software/backupserver/instance-pullrdiffbackup.cfg.in
+1
-1
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+2
-2
software/peertube/instance-peertube.cfg.in
software/peertube/instance-peertube.cfg.in
+1
-3
software/peertube/template-peertube-restore.sh.in
software/peertube/template-peertube-restore.sh.in
+3
-9
No files found.
software/backupserver/instance-pullrdiffbackup.cfg.in
View file @
3aadd960
...
...
@@ -186,7 +186,7 @@ virtual-depends =
[nginx-listen-promise]
<= monitor-promise-base
promise = check_
url_available
promise = check_
socket_listening
name = nginx_listen.py
config-host = $${nginx-configuration:ip}
config-port = $${nginx-configuration:port}
...
...
software/peertube/buildout.hash.cfg
View file @
3aadd960
...
...
@@ -18,7 +18,7 @@ md5sum = b67bad9012a8f79c66779d4c660828e2
[instance-peertube]
_update_hash_filename_ = instance-peertube.cfg.in
md5sum =
45bc81b1659aff57ec763af7863d77db
md5sum =
3096a4d3e117752b4827925129d61331
[template-nginx-service]
filename = template-nginx-service.sh.in
...
...
@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e
[template-peertube-restore-script]
filename = template-peertube-restore.sh.in
md5sum =
0b3206237adec20cbdb379d3766e4333
md5sum =
d3189a97e1898cc319acb7bc28ef3245
software/peertube/instance-peertube.cfg.in
View file @
3aadd960
...
...
@@ -146,8 +146,6 @@ name = redis
[peertube-passwd]
recipe = slapos.cookbook:generate.password
storage-path = ${directory:etc}/.peertube_user
bytes = 8
username = root
[peertube-yaml]
...
...
@@ -169,7 +167,7 @@ output = ${directory:services}/peertube
[peertube-database-resiliency-exclude-file]
recipe = slapos.recipe.template:jinja2
inline = {{ "${postgresql:pgdata-directory}/
**
" }}
inline = {{ "${postgresql:pgdata-directory}/" }}
output = ${directory:srv}/exporter.exclude
[peertube-database-resiliency-after-import-script]
...
...
software/peertube/template-peertube-restore.sh.in
View file @
3aadd960
...
...
@@ -23,9 +23,8 @@ if [ -e "$pid_file" ]; then
exit 1
fi
# 2.
echo "Deleting existing database..."
find "$${postgresql:pgdata-directory}" -mindepth 1 -delete
# 2. Restore database
$${postgresql:bin}/pg_restore -h $${postgresql:pgdata-directory} -C -c -U peertube $${directory:srv}/backup/peertube_prod-dump.db
# 3.
echo "Starting postgresql..."
...
...
@@ -57,15 +56,10 @@ echo "I: PostgreSQL ready." 1>&2
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory}
sleep 30
# If
my
sql has stopped, abort
# If
postgre
sql has stopped, abort
if ! [ -d "$${postgresql:pgdata-directory}" ]; then
echo "postgresql exited, aborting."
exit 1
fi
# 4.
echo "Importing data..."
$${postgresql:bin}/pg_restore -h $${postgresql:pgdata-directory} -c -U peertube -d peertube_prod $${directory:srv}/backup/peertube_prod-dump.db
# Check if it failed?
echo 'Backup restoration successfully completed.'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment