Fichiers de départ
This commit is contained in:
35
bin/oldies/recup_topisto_backups.sh
Executable file
35
bin/oldies/recup_topisto_backups.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
ladate=`date +%Y%m%d`
|
||||
targetdir=/opt/topisto.net
|
||||
rootdir=/tmp/download_topisto
|
||||
backdir=$rootdir/$ladate
|
||||
|
||||
param=`echo TTNsY2gxczNkM2sK | base64 -d`
|
||||
salt=`date +%Y%m%d%H`
|
||||
|
||||
cmd="wget --quiet --user backup --password $param"
|
||||
|
||||
if [ ! -d $targetdir ]
|
||||
then
|
||||
mkdir -p $targetdir
|
||||
fi
|
||||
|
||||
if [ ! -d $backdir ]
|
||||
then
|
||||
rm -rf $rootdir/*
|
||||
rm -rf $targetdir/*
|
||||
|
||||
mkdir -p $backdir
|
||||
|
||||
for fichier in www.tar.bz2 TOPISTO_apps.tar.bz2
|
||||
do
|
||||
code=`echo -n /opt/backup/$fichier$salt | md5sum | awk '{ print $1 }' `
|
||||
echo Récupération de $fichier dans $backdir/$fichier via $code
|
||||
$cmd -O $backdir/$fichier https://www.topisto.net/backup/download.php?file=$code
|
||||
cd $targetdir
|
||||
echo Extraction de $backdir/$fichier dans $targetdir
|
||||
tar xfj $backdir/$fichier
|
||||
done
|
||||
else
|
||||
echo "ALREADY DONE : Downloads from topisto.net"
|
||||
fi
|
||||
Reference in New Issue
Block a user