From Wet Mockingbird, 6 Months ago, written in Plain Text.
This paste is a reply to Re: Untitled from Elder Lund - view diff
  1. #!/bin/bash
  2.  
  3. export RESTIC_PASSWORD=(password)
  4. set -eo pipefail
  5.  
  6. # Dump databases to (temporary) file at root.
  7. mysqldump -u root -p(password) --all-databases > /databases.sql
  8. # Echo crontab for root user to (temporary) file at root.
  9. crontab -u root -l > /root.cron
  10.  
  11. restic -r /run/media/orca/DataCabinet backup /home/program /etc/httpd/conf /etc/httpd/conf.d /var/www/html /var/www/cgi-bin /home/vpopmail/domains /var/qmail/control /var/qmail/users /etc/cron.d/program* /root.cron /databases.sql /var/tinydns/root/data /etc/sysconfig/network-scripts
  12.  
  13. # Remove those temporary files placed at the root directory.
  14. rm -rf /databases.sql /root.cron
  15.  
captcha