| @@ -1,2 +1,8 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | - | rsync -avhzr --delete --progress --rsh='ssh -p11' user@111.111.111.111:/ --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile","/boot/*"} /path/to/folder | |
| 2 | + | REMOTE_USER="user" | |
| 3 | + | REMOTE_HOST="111.111.111.111" | |
| 4 | + | REMOTE_PORT="11" | |
| 5 | + | REMOTE_PATH="/" | |
| 6 | + | LOCAL_PATH="/path/to/folder" | |
| 7 | + | ||
| 8 | + | rsync -avhzr --delete --progress --rsh="ssh -p${REMOTE_PORT}" "${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile","/boot/*"} "${LOCAL_PATH}" | |
airikr / backupvps.sh
Last active 5 months ago
This script backups everything from the server besides of the excluded folders.
airikr revised this gist 10 months ago · 6fdc6aa
1 file changed, 7 insertions, 1 deletion
airikr revised this gist 10 months ago · a261489
No changes
airikr revised this gist 1 year ago · 661a2c1
1 file changed, 2 insertions
| @@ -0,0 +1,2 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | rsync -avhzr --delete --progress --rsh='ssh -p11' user@111.111.111.111:/ --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile","/boot/*"} /path/to/folder | |