sergio_educacionit

incremental_backups.sh

Sep 27th, 2025 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Datos conexion servidor de backups
  4.  
  5. host="192.168.0.53"
  6. user="educacionit"
  7.  
  8.  
  9. # crear directorio destino
  10.  
  11.  
  12. ssh ${user}@${host} "mkdir -p $HOSTNAME"
  13.  
  14.  
  15.  
  16.  
  17.  
  18. rsync -av \
  19.     -e "ssh -i /root/.ssh/id_rsa" \
  20.     /var/lib/mysql ${user}@${host}:/home/educacionit/$HOSTNAME
  21.  
Advertisement
Add Comment
Please, Sign In to add comment