Skip to content
Snippets Groups Projects
Verified Commit 900e2095 authored by David Beniamine's avatar David Beniamine
Browse files

Script to ease restoring files

parent c323315f
Branches
Tags
No related merge requests found
...@@ -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
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment