Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duplicity-ftp-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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
NoCloud
duplicity-ftp-backup
Commits
900e2095
Verified
Commit
900e2095
authored
4 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Script to ease restoring files
parent
c323315f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
clear_backup.sh
+0
-5
0 additions, 5 deletions
clear_backup.sh
restore_file.sh
+22
-0
22 additions, 0 deletions
restore_file.sh
with
22 additions
and
5 deletions
clear_backup.sh
+
0
−
5
View file @
900e2095
...
@@ -3,11 +3,6 @@
...
@@ -3,11 +3,6 @@
DIR
=
$(
realpath
$(
dirname
$0
))
DIR
=
$(
realpath
$(
dirname
$0
))
source
$DIR
/inc.sh
source
$DIR
/inc.sh
BK_FULL_FREQ
=
"1M"
# create a new full backup every...
BK_FULL_LIFE
=
"2M"
# delete any backup older than this
BK_KEEP_FULL
=
"0"
# How many full+inc cycle to keep
export
PASSPHRASE
=
"
$encpass
"
export
PASSPHRASE
=
"
$encpass
"
export
FTP_PASSWORD
=
"
$ftppass
"
export
FTP_PASSWORD
=
"
$ftppass
"
#set -x
#set -x
...
...
This diff is collapsed.
Click to expand it.
restore_file.sh
0 → 100644
+
22
−
0
View file @
900e2095
#!/bin/bash
DIR
=
$(
realpath
$(
dirname
$0
))
source
$DIR
/inc.sh
if
[
-z
"
$2
"
]
;
then
echo
"Usage
$0
<restore_path> <destination_path> [timeago]"
echo
"restore_path : path to restore without leading slash"
echo
"destination_path : path to download the file(s), duplicity will not override existing files"
echo
"timeago : optionnal : the age of the version we want to restore, for instance 6D for 6 days ago"
fi
if
[
!
-z
"
$3
"
]
;
then
delay
=
"-t
$3
"
fi
export
PASSPHRASE
=
"
$encpass
"
export
FTP_PASSWORD
=
"
$ftppass
"
/usr/bin/duplicity
--file-to-restore
$delay
"
$1
"
ftp://
$user
@
$host
/
$remotedir
/
"
$2
"
unset
PASSPHRASE
unset
FTP_PASSWORD
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