Mercurial > repos > other > usr-local-bin
view backup-website-images @ 22:faa17dcc2c95
Make a compromise when backing up to external HDD
Backups are getting bigger and space is getting short!
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 09 Jun 2019 15:52:35 +0100 |
parents | a6f490ec0c1c |
children |
line wrap: on
line source
#! /bin/bash dest=~/Websites/image-backup/ mkdir -p $dest paths="bdstrike/content/uploads/ skins/images" for path in $paths; do dest_path=${dest}${path%/*} mkdir -p $dest_path rsync -ravz -e "ssh -i /home/ibboard/.ssh/cron" vps:$path $dest_path >> /home/ibboard/cron.log 2>&1 done