#! /bin/bash 
# Last edited on 2025-02-10 14:59:26 by stolfi

# Store non-derived program files from the "baikal" laptop to manaus.ic.unicamp.br.

source ${HOME}/lib/rsync-preamble.sh
dir="projects"

cd ${HOME}/${dir}/. || ( echo "cannot cd to ${dir}"  1>&2; exit 1 )

today="`yyyy-mm-dd-hhmmss`"

rsync -avzu \
  --filter="P 00-BACKUP/**" \
  --backup \
  --backup-dir=/home/staff/stolfi/00-BACKUPS/${today} \
  --delete \
  --exclude='*.eps' \
  --exclude='*.log' \
  --exclude='*.ps' \
  --exclude='*.tar' \
  --exclude='*.tar.gz' \
  --exclude='*.tgz' \
  --exclude='*~' \
  --exclude='.[a-zA-Z]*' \
  --exclude=00-TARFILES \
  --exclude=OLD \
  --exclude=OUT \
  --exclude=log \
  --exclude=logs \
  --exclude=old \
  --exclude=ot \
  --exclude=out \
  --safe-links \
  "${extraops[@]}" \
  ./ stolfi@manaus.ic.unicamp.br:${dir}/
