Last active
April 3, 2019 18:41
-
-
Save fnx4/8aa21a3dd19312f7e9d32b7871ee9ef4 to your computer and use it in GitHub Desktop.
[vps backup] wget -O backup.sh https://gist.github.com/fnx4/8aa21a3dd19312f7e9d32b7871ee9ef4/raw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| day=$(date +%F) | |
| bfile="backup$day.tgz" | |
| echo "Started: " | |
| date | |
| echo | |
| #service apache2 stop | |
| #service icinga2 stop | |
| #service mariadb stop | |
| #service mysql stop | |
| #service openvpn stop | |
| #service openvpn@server stop | |
| echo | |
| tar cvzf /$bfile --exclude=/proc / | |
| echo | |
| #service apache2 start | |
| #service icinga2 start | |
| #service mariadb start | |
| #service mysql start | |
| #service openvpn start | |
| #service openvpn@server start | |
| echo | |
| echo "Finished: " | |
| date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment