Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Gervais
backupninja
Commits
6a04f4be
Commit
6a04f4be
authored
Feb 21, 2017
by
Christopher Gervais
Browse files
Options
Downloads
Patches
Plain Diff
Support restic's --one-file-system option.
parent
97153e44
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example.restic
+3
-0
3 additions, 0 deletions
examples/example.restic
handlers/restic.in
+8
-2
8 additions, 2 deletions
handlers/restic.in
with
11 additions
and
2 deletions
examples/example.restic
+
3
−
0
View file @
6a04f4be
...
@@ -32,6 +32,9 @@ exclude =
...
@@ -32,6 +32,9 @@ exclude =
# This option may be specified multiple times.
# This option may be specified multiple times.
tag =
tag =
# Only backup files from the file systems on which the initially specified files or directories reside.
one_file_system = yes
[retention]
[retention]
# Never delete the n last (most recent) snapshots
# Never delete the n last (most recent) snapshots
...
...
This diff is collapsed.
Click to expand it.
handlers/restic.in
+
8
−
2
View file @
6a04f4be
...
@@ -44,6 +44,7 @@ if [[ "$backup" == "yes" ]]; then
...
@@ -44,6 +44,7 @@ if [[ "$backup" == "yes" ]]; then
getconf include
"/etc /home /usr/local"
getconf include
"/etc /home /usr/local"
getconf exclude
"/tmp /proc /dev /sys /net /misc /media /srv /selinux"
getconf exclude
"/tmp /proc /dev /sys /net /misc /media /srv /selinux"
getconf tag
getconf tag
getconf one_file_system
"yes"
if
[
-z
"
$include
"
]
;
then
if
[
-z
"
$include
"
]
;
then
debug
"No files or directories specified for backup."
debug
"No files or directories specified for backup."
...
@@ -78,9 +79,14 @@ if [[ "$backup" == "yes" ]]; then
...
@@ -78,9 +79,14 @@ if [[ "$backup" == "yes" ]]; then
done
done
fi
fi
if
[[
"
$one_file_system
"
==
"yes"
]]
;
then
other_options
=
"
$other_options
--one-file-system"
fi
info
"Taking backup snapshot."
info
"Taking backup snapshot."
debug
"Running: restic --repo
$repo
--password-file
$password_file
backup
$tag_options
$exclude_options
$include_options
"
debug
"Running: restic --repo
$repo
--password-file
$password_file
backup
$other_options
$tag_options
$exclude_options
$include_options
"
restic
--repo
$repo
--password-file
$password_file
backup
$tag_options
$exclude_options
$include_options
restic
--repo
$repo
--password-file
$password_file
backup
$other_options
$tag_options
$exclude_options
$include_options
[
$?
-ne
0
]
&&
fatal
"restic backup failed."
[
$?
-ne
0
]
&&
fatal
"restic backup failed."
else
else
...
...
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