Mercurial > repos > other > usr-local-bin
annotate 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 |
rev | line source |
---|---|
0 | 1 #! /bin/bash |
2 | |
3 dest=~/Websites/image-backup/ | |
4 mkdir -p $dest | |
5 | |
21
a6f490ec0c1c
Update website backup scripts to new sites
IBBoard <dev@ibboard.co.uk>
parents:
9
diff
changeset
|
6 paths="bdstrike/content/uploads/ |
0 | 7 skins/images" |
8 | |
9 for path in $paths; do | |
10 dest_path=${dest}${path%/*} | |
11 mkdir -p $dest_path | |
9
a3c7051ceb21
Fix paths so rsync of images works
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
12 rsync -ravz -e "ssh -i /home/ibboard/.ssh/cron" vps:$path $dest_path >> /home/ibboard/cron.log 2>&1 |
0 | 13 done |