summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbooo <borgers@mi.fu-berlin.de>2012-09-27 11:14:27 +0200
committerbooo <borgers@mi.fu-berlin.de>2012-09-27 11:14:27 +0200
commita5274464ccb7df68b8b154511b03ce94df324b69 (patch)
treeaa22c0057a33d0627264a01d5dbb7645141afac5
parenteaaea985301427568dac310f721404327893133a (diff)
downloadmirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.tar.gz
mirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.tar.bz2
mirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.zip
Fix osm sync script. Do not reload subdirectories on every sync.
-rwxr-xr-xbin/sync-osm-planet.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/sync-osm-planet.sh b/bin/sync-osm-planet.sh
index 6a2cd1a..2bea5e6 100755
--- a/bin/sync-osm-planet.sh
+++ b/bin/sync-osm-planet.sh
@@ -7,6 +7,9 @@ RSYNC_OPTS=(
"-Hax"
"--delete"
"--delete-excluded"
+ "--include=planet/"
+ "--include=planet/$(date +%Y)/"
+ "--include=pbf/"
"--include=*-$(date +%y%m)*"
"--include=*-$(date -d '-1month' +%y%m)*"
"--include=*-$(date -d '-2month' +%y%m)*"
@@ -24,9 +27,7 @@ TRACKER=(
"udp://tracker.openbittorrent.com:80/announce" )
MKTORRENT_OPTS=( "-l 22" )
-${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}planet/" "${DST}planet/"
-${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}planet/$(date +%Y)/" "${DST}planet/$(date +%Y)/"
-${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}pbf/" "${DST}pbf/"
+${RSYNC} "${RSYNC_OPTS[@]}" ${SRC} ${DST}
# create torrents
#for file in ${DST}/*.bz2