diff options
author | booo <borgers@mi.fu-berlin.de> | 2012-09-27 11:14:27 +0200 |
---|---|---|
committer | booo <borgers@mi.fu-berlin.de> | 2012-09-27 11:14:27 +0200 |
commit | a5274464ccb7df68b8b154511b03ce94df324b69 (patch) | |
tree | aa22c0057a33d0627264a01d5dbb7645141afac5 /bin/sync-osm-planet.sh | |
parent | eaaea985301427568dac310f721404327893133a (diff) | |
download | mirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.tar.gz mirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.tar.bz2 mirror-sync-a5274464ccb7df68b8b154511b03ce94df324b69.zip |
Fix osm sync script. Do not reload subdirectories on every sync.
Diffstat (limited to 'bin/sync-osm-planet.sh')
-rwxr-xr-x | bin/sync-osm-planet.sh | 7 |
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 |