Skip to content

Commit

Permalink
[backup_ovh] move getftp to backup_ovh
Browse files Browse the repository at this point in the history
  • Loading branch information
ochurlaud committed Jul 28, 2023
1 parent d57c2d4 commit ca10e94
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
19 changes: 19 additions & 0 deletions scripts/backup_ovh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#/bin/sh

CONFIG="${HOME}/.config/backup_ovh.conf"
if [ ! -f "$CONFIG" ] ; then
echo "[ERROR] config expected at $CONFIG"
echo "[ERROR] Expected content:"
echo " URI_BACKUP= # An URI to access to trigger a backup"
echo " USERNAME= # The user to the ftp server"
echo " PASSWORD= # The password to the ftp server"
echo " HOST= # The host to backup"
echo " DESTDIR=\"\${HOME}/Téléchargements/\${HOST}\" # Where to store the backup"
exit 1
fi

source "${CONFIG}"

wget -qnv -O - ${URI_BACKUP} > /dev/null
lftp -u $USERNAME,$PASSWORD "ftp://$HOST" -e "mirror -e . -P10 $DESTDIR ; quit"
echo $(date -I) > $DESTDIR/backup_date.txt
12 changes: 0 additions & 12 deletions scripts/getftp.sh

This file was deleted.

0 comments on commit ca10e94

Please sign in to comment.