Enviado em 09/12/2020 - 10:13h
Bom dia, Boa tarde, Boa noite!!#!/bin/bash
linha="|--------------------------------------------|";
LOG="./reg-log.txt";
printf "${linha}\n Sincronização iniciada: %(%x-%X)T\n${linha}\n" >> $LOG
# -r => Recursively copy entire directories.
for Dirs in CHP{E,I,G};do
#scp -r "/home/saai/${Dirs}/" Teste@150.163.105.18:/home/Teste/Config/TEMP/
rsync -update "/home/saai/${Dirs}/" saai@150.163.38.130:/home/Teste/Config/TEMP/
done
printf "${linha}\n Sincronização finalizada: %(%x-%X)T\n${linha}\n" >> $LOG
rsync: Failed to exec -a: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.2]
rsync: Failed to exec -a: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.2]
rsync: Failed to exec -a: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.2]