annotate backup-website-images @ 34:fb4dd1974129

Ensure fixed ordering of values Also ensures we don't get ACPI readings
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Feb 2021 15:57:09 +0000
parents a6f490ec0c1c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #! /bin/bash
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 dest=~/Websites/image-backup/
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 mkdir -p $dest
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
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
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 skins/images"
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 for path in $paths; do
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 dest_path=${dest}${path%/*}
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
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
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 done