Premier commit ...
This commit is contained in:
parent
e78ef5948b
commit
a1442e534d
10
roles/smb-backup/files/backupnxc.sh
Normal file
10
roles/smb-backup/files/backupnxc.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# envoie sur s-backup
|
||||||
|
BACKUP=/home/backup/s-nxc
|
||||||
|
|
||||||
|
# Préparation des dossiers qui vont accueillir les données à sauvegarder (-e lance le répertoire si il existe)
|
||||||
|
[[ -e "${BACKUP}" ]] || mkdir -p "${BACKUP}"
|
||||||
|
|
||||||
|
# Sauvegarde du fichier nxc.tgz vers la machine s-backup
|
||||||
|
scp -i ~/.ssh/id_rsa_sbackup root@s-nxc.gsb.adm:/root/nxc/nxc.tgz "${BACKUP}/"
|
@ -14,6 +14,14 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: copie script backupnxc dans /usr/local/bin
|
||||||
|
copy:
|
||||||
|
src: backupnxc.sh
|
||||||
|
dest: /usr/local/bin
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
- name: crontab backupsmb ( commentee par defaut )
|
- name: crontab backupsmb ( commentee par defaut )
|
||||||
cron:
|
cron:
|
||||||
name: backupsmb
|
name: backupsmb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user