# -C keeps the paths in the archive relative, and the single quotes mean
# date runs on the remote host rather than on this one.
tar czf - -C /var/www shop
| ssh [email protected] 'cat > /backup/shop-$(date +%F).tar.gz'
# -C keeps the paths in the archive relative, and the single quotes mean
# date runs on the remote host rather than on this one.
tar czf - -C /var/www shop
| ssh [email protected] 'cat > /backup/shop-$(date +%F).tar.gz'