rsync, backup fonte: https://www.tecmint.com/rsync-local-remote-file-synchronization-commands/
#Basic syntax of rsync command
rsync options source destination
#Some common options used with rsync commands
#-v : verbose
#-r : copies data recursively (but don’t preserve timestamps and permission while transferring data
#-a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
#-z : compress file data
#-h : human-readable, output numbers in a human-readable format
#--progress : show progress
#--remove-source-files : delete source files after transfer
#Copy/Sync a File on a Local Computer
rsync -zvh backup.tar /tmp/backups/
#Copy/Sync a Directory on Local Computer
rsync -avzh /root/rpmpkgs /tmp/backups/
#Copy a Directory from Local Server to a Remote Server
rsync -avz rpmpkgs/ root@192.168.0.101:/home/
#Copy/Sync a Remote Directory to a Local Machine
rsync -avzh root@192.168.0.100:/home/tarunika/rpmpkgs /tmp/myrpms
#Copy a File from a Remote Server to a Local Server with SSH
rsync -avzhe ssh root@192.168.0.100:/root/install.log /tmp/
#Copy a File from a Local Server to a Remote Server with SSH
rsync -avzhe ssh backup.tar root@192.168.0.100:/backups/
#Show Progress While Transferring Data with rsync
rsync -avzhe ssh --progress /home/rpmpkgs root@192.168.0.100:/root/rpmpkgs
# Use of –include and –exclude Options
rsync -avze ssh --include 'R*' --exclude '*' root@192.168.0.101:/var/lib/rpm/ /root/rpm
#Use of –delete Option
#We can use ‘–delete‘ option to delete files that are not there in source directory.
rsync -avz --delete root@192.168.0.100:/var/lib/rpm/ .
# Set the Max Size of Files to be Transferred
rsync -avzhe ssh --max-size='200k' /var/lib/rpm/ root@192.168.0.100:/root/tmprpm
# Automatically Delete source Files after successful Transfer
rsync --remove-source-files -zvh backup.tar /tmp/backups/
#Do a Dry Run with rsync
#If you are a newbie and using rsync and don’t know what exactly your
#command going do. Rsync could really mess up the things in your destination folder and then doing an undo can be a tedious job.
rsync --dry-run --remove-source-files -zvh backup.tar /tmp/backups/
#Set Bandwidth Limit and Transfer File
rsync --bwlimit=100 -avzhe ssh /var/lib/rpm/ root@192.168.0.100:/root/tmprpm/
### # ###
#usando o sshpass
sshpass -p 'alca' rsync --progress -avz -e ssh alcatraz@192.168.1.4:/drives/k/Backup/cobian /mnt/backup/elaine-pc/.