Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
IML Open Source
iml-backup
Commits
7ab97039
Commit
7ab97039
authored
4 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch 'version-2' into 'master'
Version 2 See merge request
!2
parents
1419a592
6dcab200
Branches
Branches containing commit
No related tags found
1 merge request
!2
Version 2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jobs/transfer.job.dist
+78
-38
78 additions, 38 deletions
jobs/transfer.job.dist
plugins/transfer/restic.sh
+3
-1
3 additions, 1 deletion
plugins/transfer/restic.sh
with
81 additions
and
39 deletions
jobs/transfer.job.dist
+
78
−
38
View file @
7ab97039
...
...
@@ -12,63 +12,103 @@
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# general settings
# ----------------------------------------------------------------------
# encrypt backup sets with gnupg password
gnupg-passphrase = EnterYourSecretHere
# ......................................................................
# backend:
# ......................................................................
#
# ===== Duplicity:
#
# file based / Samba share
# storage = file:///some/where
#
# ssh connection:
# storage = rsync://bacup@storage.example.com//netshare/backup
# if rsync does not work try scp (is slower)
# storage = scp://backup@storage.example.com//netshare/backup
#
# ===== Restic
# DOCS: https://restic.readthedocs.io/
#
# ssh connection:
# storage = sftp://backup@storage.example.com//netshare/backup
#
# https connection (requires a Http Rest server - i.e. Restic Http or Rclone http server)
# storage = rest:https://user:pass@host:8000/my_backup_repo/
#
#
#
# ===== for scp/ sftp/ rsync transfer you need to add an ssh private key
# ssh-privatekey = /opt/imlbackup/client/keys/id_imlbackup@storage-connector.iml.unibe.ch
#
# HINT: if using scp:// on Debian 8 enable ssh-backend; default: no value
# duplicity_ssh-backend = pexpect
# time to keep backup sets on storage
# M - monthes
# Y - years
keep = 3M
# volume size on backup target
volsize = 350
# ----------------------------------------------------------------------
# BASIC settings
# ----------------------------------------------------------------------
# use another cache directory than ~/.cache/duplicity/
cachedir =
# what tool to use? one of duplicity|restic ... see plugins/transfer/*.sh
bin = restic
# bin = duplicity
# ----------------------------------------------------------------------
# encrypt backup sets with a password
# remark: "gnupg-passphrase = ..." is deprecated
passphrase = EnterYourSecretHere
# automatic backup of samba shares
# if set to 1 and a local smb.conf is detected each share will be backupped
sambashares = 1
# ----------------------------------------------------------------------
# automatic backup of samba shares (only if samba shares were detected)
sambashares = 1
# target directory for restore (duplicity does not overwrite any existing file)
# you need to copy files from here to the needed place
restore-path = /restore
# ----------------------------------------------------------------------
# backup target url
#
# DUPLICITY
# values without prefix "duplicity_" are deprecated
#
# ----------------------------------------------------------------------
# target directory where to store the backups
# It is a base url for duplicity (behind it the hostname will be added)
#
# example I:
# use the local filesystem or (already) mounted device
# for fallback on Debian 8:
# ssh-backend = pexpect
# duplicity_ssh-backend =
# time to keep backup sets on storage
# M - monthes
# Y - years
# keep = 6M
duplicity_keep = 6M
# volume size on backup target im MB
# volsize = 350
duplicity_volsize = 350
# use another cache directory than ~/.cache/duplicity/
# cachedir =
duplicity_cachedir =
# ----------------------------------------------------------------------
#
#
storage = file:///run/media/username/nas
#
RESTIC
#
# example II:
# use local filesystem or mounted device
# storage = scp://imlbackup@lithium.iml.unibe.ch//netshare/backup/one
# ----------------------------------------------------------------------
# for file:// targets - you can add a test file that must be found
# to detect that a backup volume is mounted
# storage-file = /run/media/username/nas/I_am_mounted.txt
# use another cache directory than /root/.cache/restic
restic_cachedir =
# ssh-privatekey = /opt/imlbackup/client/keys/id_rsa_4_backupserver
ssh-privatekey =
restic_verbose = 2
restic_tag = imlbackup
# for fallback on Debian 8:
# ssh-backend = pexpect
ssh-backend =
restic_mountpoint = /mnt/restore
# prune
restic_keep-hourly = 100
restic_keep-daily = 90
restic_keep-weekly = 12
restic_keep-monthly = 12
restic_keep-yearly = 10
# ----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
plugins/transfer/restic.sh
+
3
−
1
View file @
7ab97039
...
...
@@ -253,13 +253,15 @@
# Mount backup data
function
t_restoreDoMountBackupdata
(){
local
_cmd
=
echo
HINT: This feature requires fuse. It works on UNIX/ LINUX platforms - not on MS Windows.
echo
HINT: This feature requires fuse. It works
with root
on UNIX/ LINUX platforms - not on MS Windows.
echo
if
[
-z
"
$RESTIC_MOUNTPOINT
"
]
;
then
color error
echo
"ERROR: no mountpoint was set in
${
STORAGEFILE
}
; example: restic_mountpoint = /mnt/restore"
color reset
else
j_requireUser
"root"
test
-d
"
$RESTIC_MOUNTPOINT
"
||
mkdir
-p
$RESTIC_MOUNTPOINT
_cmd
=
"restic mount
${
ARGS_DEFAULT
}
$RESTIC_MOUNTPOINT
"
test
-z
"
${
BACKUP_DIR
}
"
||
_cmd
=
"restic mount
${
ARGS_DEFAULT
}
--path
${
BACKUP_DIR
}
$RESTIC_MOUNTPOINT
"
echo
$_cmd
...
...
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