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
bb18ec92
Commit
bb18ec92
authored
Nov 22, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube backup fixup
parent
e6c66971
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
+12
-10
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+2
-2
software/peertube/instance-peertube-input-schema.json
software/peertube/instance-peertube-input-schema.json
+6
-0
software/peertube/instance-peertube.cfg.in
software/peertube/instance-peertube.cfg.in
+2
-1
software/peertube/template-peertube-backup.sh.in
software/peertube/template-peertube-backup.sh.in
+2
-7
No files found.
software/peertube/buildout.hash.cfg
View file @
bb18ec92
...
...
@@ -18,7 +18,7 @@ md5sum = 9eed4136d9d6f8f855b73bbfefa6397c
[instance-peertube]
_update_hash_filename_ = instance-peertube.cfg.in
md5sum =
f789217b73552cc58f5db4fd2fd77203
md5sum =
98bb0b9767129b2fb67dba2ed02e4d04
[template-nginx-service]
filename = template-nginx-service.sh.in
...
...
@@ -50,4 +50,4 @@ md5sum = f1f82101258de19068262b7213fc478b
[template-peertube-backup-script]
filename = template-peertube-backup.sh.in
md5sum = 5
dd471d958e68ce4e14cccc090ef23c
e
md5sum = 5
8d1a4fe246169dea94d7d243b4bac9
e
software/peertube/instance-peertube-input-schema.json
View file @
bb18ec92
...
...
@@ -4,6 +4,12 @@
"description"
:
"Parameters to instantiate Peertube"
,
"additionalProperties"
:
false
,
"properties"
:
{
"frequency"
:
{
"title"
:
"Backup Frequency"
,
"description"
:
"Backup Frequency"
,
"default"
:
""
,
"type"
:
"string"
},
"fronted-url"
:
{
"title"
:
"Frontend URL"
,
"description"
:
"Frontend URL"
,
...
...
software/peertube/instance-peertube.cfg.in
View file @
bb18ec92
...
...
@@ -193,13 +193,14 @@ logfile = ${directory:log}/crond.log
recipe = slapos.recipe.template
url = {{ tempalte_peertube_backup }}
output = ${directory:etc}/${:_buildout_section_name_}
mode = 0744
[peertube-backup-cron]
recipe = slapos.recipe.template
url = {{ template_crontab_line }}
output = ${directory:cron-lines}/${:_buildout_section_name_}
script = ${peertube-backup-script:output}
frequency = {{ slapparameter_dict.get('frequency', 'daily') }}
frequency = {{ slapparameter_dict.get('frequency', '
@
daily') }}
[activate-crontab-file]
# XXX File is never removed
...
...
software/peertube/template-peertube-backup.sh.in
View file @
bb18ec92
echo "Hello Peertube"
#!${dash-output:dash}
# Dump the databse
$${postgresql:bin}/pg_dump -h $${postgresql:pgdata-directory} -U $${postgresql:superuser} -Fc peertube_prod > $${directory:peertube_directory}/peertube_prod-dump.db
# For test the database contains expected content
$${postgresql:bin}/pg_dump -h $${postgresql:pgdata-directory} -U $${postgresql:superuser} --column-inserts --data-only --table=user peertube_prod > $${directory:peertube_directory}/peertube_prod-dump.sql
cp -r $${directory:srv}/postgresql $${directory:peertube_directory}/postgresql_back
$${postgresql:bin}/pg_dump -h $${postgresql:pgdata-directory} -U $${postgresql:superuser} -Fc peertube_prod > $${directory:srv}/backup/peertube_prod-dump.db
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