Skip to content

Instantly share code, notes, and snippets.

@diyfr
Created January 10, 2019 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diyfr/34f242844899fc9b632a23d0e8ec593d to your computer and use it in GitHub Desktop.
Save diyfr/34f242844899fc9b632a23d0e8ec593d to your computer and use it in GitHub Desktop.
Save Domoticz Database to distant Server
# A faire une fois
# Pour automatiser le transfert vers un autre serveur via SCP sans avoir à saisir le mot de passe
# Soit USER compte utilisateur de la machine distante et HOST adresse de la machine distante
# ssh-keygen -t rsa -C "USER@HOST"
# valider par défaut
# ssh-copy-id USER@HOST
# Ne pas s'occuper du texte, saisir le mot de passe pour USER sur HOST
FILE=/home/pi/domoticz/backup/domoticz_backup_`date +%d-%m-%Y"_"%H_%M_%S`.db
cp /home/pi/domoticz/domoticz.db $FILE
# Remplacer USER et HOST ci-dessous
/usr/bin/scp $FILE USER@HOST:/home/domoticz/backup/
rm $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment