Skip to content

Instantly share code, notes, and snippets.

@bodiam
Created September 8, 2013 18:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bodiam/6487401 to your computer and use it in GitHub Desktop.
Save bodiam/6487401 to your computer and use it in GitHub Desktop.
This script mirrors the gutenberg cache of generated file formats.
#!/bin/bash
# This script mirrors the gutenberg cache
# of generated file formats
# By Braddock Gaskill 2013
DIR=/knowledge/data/gutenberg/cache/generated
mkdir -p "${DIR}"
cd "${DIR}"
pwd
while (true); do
echo -n 'RSYNC START '
date
rsync --progress -avHSz --delete --delete-after \
--exclude='*.zip' \
--exclude='*.mp3' \
--exclude='*.ogg' \
--exclude='*.iso' \
--exclude='*.ISO' \
--exclude='*pgdvd*' \
--exclude='*.rar' \
--exclude='*.mpeg' \
--exclude='*.m4b' \
--exclude='*.wav' \
--exclude='*.log' \
--exclude='*.mobi' \
--exclude='*.pdb' \
--exclude='*.rdf' \
--exclude='*.qioo.jar' \
ftp@ftp.ibiblio.org::gutenberg-epub .
echo -n 'SLEEPING 30 MINUTES: RSYNC ENDED '
date
sleep 1800
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment