Advertisement
sergio_educacionit

Untitled

Dec 27th, 2022
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. # Backups incrementales de ficheros estaticos
  5.  
  6.  
  7. arr=(/etc /boot)
  8.  
  9. mkdir -p /mnt/backup/incrementales
  10.  
  11. for dir in ${arr[@]}; do
  12. rsync -av $dir /mnt/backup/incrementales
  13.  
  14. done
  15.  
  16. # backup bases de datos.
  17.  
  18. mkdir -p /var/backups/mysql
  19. #systemctl stop mariadb
  20.  
  21.  
  22. mysqldump -uroot wp_database > /var/backups/mysql/wp_database.sql
  23.  
  24. #systemctl start mardiadb
  25.  
  26.  
  27.  
  28.  
  29. # Backup diferenciales ficheros variables diarios
  30. # Fichero '/etc/rsnapshot.conf'
  31. # ...
  32. # backup /var/www/ ...
  33. # backup /var/lib/mysql/ ...
  34.  
  35. rsnapshot daily
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement