Ceci est une ancienne révision du document !

Sauvegarder un site sans base de données avec **Duplicity**

Duplicity permet de compresser, copier et crypter un répertoire du serveur, puis de l'envoyer via FTP sur un serveur de sauvegarde. A automatiser ensuite avec un cron.

<file> # # Script created on 25-11-2015 # # This script was created to make Duplicity backups. # Full backups are made on the 1st day of each month. # Then incremental backups are made on the other days. # # Source: https://help.ubuntu.com/community/DuplicityBackupHowto # Loading the day of the month in a variable. date=`date +%d` # Setting the pass phrase to encrypt the backup files. export PASSPHRASE='UnePassPhraseDifficileADeviner' export PASSPHRASE

# Setting the password for the FTP account that the # backup files will be transferred to. FTP_PASSWORD='MotDePasseFTP' export FTP_PASSWORD

# Check to see if we're at the first of the month. # If we are on the 1st day of the month, then run # a full backup. If not, then run an incremental # backup. if [ $date = 01 ] then

      duplicity full DossierASauvegarder ftp://Login@DossierASauvegarder >>/var/log/duplicity/monLogPerso.log


      duplicity DossierASauvegarder ftp://Login@DossierASauvegarder >>/var/log/duplicity/monLogPerso.log


# Check http://www.nongnu.org/duplicity/duplicity.1.html # for all the options available for Duplicity.

# Deleting old backups

      duplicity remove-older-than 1Y --force ftp://Login@DossierASauvegarder >>/var/log/duplicity/monLogPerso.log

# Unsetting the confidential variables so they are # gone for sure. unset PASSPHRASE unset FTP_PASSWORD

exit 0 <file>

  • duplicity.1448573652.txt.gz
  • Dernière modification: 2016/03/04 08:05
  • (modification externe)