Mercurial > repos > other > usr-local-bin
annotate backup-website-images @ 2:30145875d811
Update when we pull website code down
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 09 Nov 2014 09:27:00 +0000 |
parents | e85e3470a41e |
children | a3c7051ceb21 |
rev | line source |
---|---|
0 | 1 #! /bin/bash |
2 | |
3 dest=~/Websites/image-backup/ | |
4 mkdir -p $dest | |
5 | |
6 paths="glittergoth/image/data | |
7 glittergoth/image/*.* | |
8 glittergoth/AlchemyCatalogue/*.* | |
9 glittergoth/AlchemyCatalogue/Thumbs/*.* | |
10 skins/images" | |
11 | |
12 for path in $paths; do | |
13 dest_path=${dest}${path%/*} | |
14 mkdir -p $dest_path | |
15 rsync -ravz -e "ssh -i /home/ibboard/.ssh/cron" vps:/srv/sites/$path $dest_path >> /home/ibboard/cron.log 2>&1 | |
16 done | |
17 | |
18 |