Stockage et Sauvegardes - Rsync automatique sur Public Cloud Archive
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Rsync automatique sur Public Cloud Archive

Von
Jean-Michel
Erstellungsdatum 2017-02-07 20:22:26 (edited on 2024-09-04 13:54:54) in Stockage et Sauvegardes

Bonjour,
voulant automatiser mes sauvegardes sur un conteneur Public Cloud Archive via un rsync, je souhaite lancer mon script sans devoir rentrer le mot de passe.
Or là où avant j'utilisais un keyfile et je déployais ma clé publique, cela n'est pas possible sur un PCA.
J'ai tenté de spécifier la variable RSYNC_PASSWORD ou de mettre l'option --password-file mais en vain.
Quelqu'un a-t-il une piste ?
Merci pour votre aide.


1 Antwort ( Latest reply on 2017-02-13 09:33:31 Von
XavierL
)

Salut,

Tu peux utiliser `sshpass`, par exemple en utilisant la variable d'environnement `SSHPASS` avec l'option `-e`.

`sshpass -e rsync [options] [source] pca@[destination]:/containerX`