#!/bin/sh
set -e
# a script to grab today's wp backups
webhost="" # webhost domain/ip
webuser="" # your username on the server
wpbupath="" # path to wpbackups on server
homeuser="" # username at home
homehost="" # domain/ip at home
localbupath="" # path to backups at home

#### find today's files & scp them to the imac
cd $localbupath
ssh $webuser@$webhost \
"find $wpbupath -type f -mtime 0 \
-exec scp {} $homeuser@$homehost:$localbupath \;"
