Created
November 24, 2020 06:39
-
-
Save charego/f4249f26c09938f88995436c395f2a79 to your computer and use it in GitHub Desktop.
Backup NGINX/webserver config
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 | |
SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) | |
USER=charles | |
HOST=gould.dev | |
echo "Backing up nginx config..." | |
mkdir -p "${SCRIPT_DIR}/etc/nginx/" | |
rsync -azv ${USER}@${HOST}:/etc/nginx/ etc/nginx/ | |
echo "Backing up web root..." | |
mkdir -p "${SCRIPT_DIR}/var/www/" | |
rsync -azv ${USER}@${HOST}:/var/www/ var/www/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment