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
...
@@ -18,7 +18,7 @@ md5sum = 9eed4136d9d6f8f855b73bbfefa6397c
[instance-peertube]
[instance-peertube]
_update_hash_filename_ = instance-peertube.cfg.in
_update_hash_filename_ = instance-peertube.cfg.in
md5sum =
f789217b73552cc58f5db4fd2fd77203
md5sum =
98bb0b9767129b2fb67dba2ed02e4d04
[template-nginx-service]
[template-nginx-service]
filename = template-nginx-service.sh.in
filename = template-nginx-service.sh.in
...
@@ -50,4 +50,4 @@ md5sum = f1f82101258de19068262b7213fc478b
...
@@ -50,4 +50,4 @@ md5sum = f1f82101258de19068262b7213fc478b
[template-peertube-backup-script]
[template-peertube-backup-script]
filename = template-peertube-backup.sh.in
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 @@
...
@@ -4,6 +4,12 @@
"description"
:
"Parameters to instantiate Peertube"
,
"description"
:
"Parameters to instantiate Peertube"
,
"additionalProperties"
:
false
,
"additionalProperties"
:
false
,
"properties"
:
{
"properties"
:
{
"frequency"
:
{
"title"
:
"Backup Frequency"
,
"description"
:
"Backup Frequency"
,
"default"
:
""
,
"type"
:
"string"
},
"fronted-url"
:
{
"fronted-url"
:
{
"title"
:
"Frontend URL"
,
"title"
:
"Frontend URL"
,
"description"
:
"Frontend URL"
,
"description"
:
"Frontend URL"
,
...
...
software/peertube/instance-peertube.cfg.in
View file @
bb18ec92
...
@@ -193,13 +193,14 @@ logfile = ${directory:log}/crond.log
...
@@ -193,13 +193,14 @@ logfile = ${directory:log}/crond.log
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = {{ tempalte_peertube_backup }}
url = {{ tempalte_peertube_backup }}
output = ${directory:etc}/${:_buildout_section_name_}
output = ${directory:etc}/${:_buildout_section_name_}
mode = 0744
[peertube-backup-cron]
[peertube-backup-cron]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = {{ template_crontab_line }}
url = {{ template_crontab_line }}
output = ${directory:cron-lines}/${:_buildout_section_name_}
output = ${directory:cron-lines}/${:_buildout_section_name_}
script = ${peertube-backup-script:output}
script = ${peertube-backup-script:output}
frequency = {{ slapparameter_dict.get('frequency', 'daily') }}
frequency = {{ slapparameter_dict.get('frequency', '
@
daily') }}
[activate-crontab-file]
[activate-crontab-file]
# XXX File is never removed
# XXX File is never removed
...
...
software/peertube/template-peertube-backup.sh.in
View file @
bb18ec92
echo "Hello Peertube"
#!${dash-output:dash}
# Dump the databse
# Dump the databse
$${postgresql:bin}/pg_dump -h $${postgresql:pgdata-directory} -U $${postgresql:superuser} -Fc peertube_prod > $${directory:peertube_directory}/peertube_prod-dump.db
$${postgresql:bin}/pg_dump -h $${postgresql:pgdata-directory} -U $${postgresql:superuser} -Fc peertube_prod > $${directory:srv}/backup/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
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