Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Restic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chen Tao
Restic
Commits
c921a961
Commit
c921a961
authored
1 year ago
by
Chen Tao
Browse files
Options
Downloads
Patches
Plain Diff
add secrets for USERNAME and PASSWORD
parent
7fd93552
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
docker-compose.yml
+12
-3
12 additions, 3 deletions
docker-compose.yml
scripts/000-config.sh
+6
-4
6 additions, 4 deletions
scripts/000-config.sh
secrets/.gitignore
+2
-0
2 additions, 0 deletions
secrets/.gitignore
with
22 additions
and
8 deletions
.gitignore
+
2
−
1
View file @
c921a961
data
data
\ No newline at end of file
sec
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
12
−
3
View file @
c921a961
...
@@ -11,9 +11,18 @@ services:
...
@@ -11,9 +11,18 @@ services:
environment
:
environment
:
EXEC_INTERVAL_MINUTE
:
10
EXEC_INTERVAL_MINUTE
:
10
RUN_ON_STARTUP
:
true
RUN_ON_STARTUP
:
true
RESTIC_USER
:
$USER
RESTIC_USER_FILE
:
/run/secrets/USERNAME
RESTIC_PASSWORD
:
'
%24---%40'
RESTIC_PASSWORD_FILE
:
/run/secrets/PASSWORD
# %24 means $, %40 means @
# DEBUG: true
# DEBUG: true
RESTIC_HOST
:
restic-lab.phys.ethz.ch
RESTIC_HOST
:
restic-lab.phys.ethz.ch
secrets
:
-
USERNAME
-
PASSWORD
secrets
:
USERNAME
:
file
:
./secrets/USERNAME
PASSWORD
:
file
:
./secrets/PASSWORD
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/000-config.sh
+
6
−
4
View file @
c921a961
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
RESTIC_DIR
=
"
${
HOME
}
/.backupbox-phys"
RESTIC_DIR
=
"
${
HOME
}
/.backupbox-phys"
if
[
-z
"
$RESTIC_
USER
"
]
;
then
if
[
-z
$RESTIC_
HOST
]
;
then
echo
"Please provide your restic
user
from the backupbox web interface: "
echo
"Please provide your restic
host
from the backupbox web interface: "
exit
1
exit
1
fi
fi
if
[
-z
$RESTIC_HOST
]
;
then
if
[
-f
"
$RESTIC_USER_FILE
"
]
;
then
echo
"Please provide your restic host from the backupbox web interface: "
RESTIC_USER
=
$(
cat
$RESTIC_USER_FILE
)
elif
[
-z
"
$RESTIC_USER
"
]
;
then
echo
"Please provide your restic user from the backupbox web interface: "
exit
1
exit
1
fi
fi
...
...
This diff is collapsed.
Click to expand it.
secrets/.gitignore
0 → 100644
+
2
−
0
View file @
c921a961
*
!.gitignore
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment