Enable rsync preallocate to limit filesystem fragmentation of file creation.
Enable rsync fuzzy where suitable to leverage diffing from existing files.
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B osm-blog-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export GZIP="--rsyncable -9"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B chef-repository-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export GZIP="--rsyncable -9"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B chef-server-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B osmf-crm-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
pg_dump --user=backup --format=custom --file=$F openstreetmap
export RSYNC_RSH="ssh -ax"
-rsync $F backup.openstreetmap.org::backup
+rsync --preallocate $F backup.openstreetmap.org::backup
rm -f $F
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B osm-donate-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B forum-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B git-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B lists-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
ln -s <%= @directory %> $T/wiki-<%= @name %>-$D/www
export GZIP="--rsyncable -9" #make backup rsyncable
nice tar --create --gzip --dereference --directory=$T --exclude=wiki-<%= @name %>-$D/www/w/images/thumb --exclude=wiki-<%= @name %>-$D/www/w/.git --exclude=wiki-<%= @name %>-$D/www/w/extensions/*/.git --file=$T/$B wiki-<%= @name %>-$D
-nice rsync $T/$B backup::backup --fuzzy
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B munin-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
pg_dump --file=$F -F c -Z 9 -t file -t '*columns' -t 'import_polygon_*' -t import_status -t place_addressline -t location_property_osmline -t placex -t search_name -t 'seq_*' -t word <%= @db %>
export RSYNC_RSH="ssh -ax"
-rsync $F backup.openstreetmap.org::backup
+rsync --preallocate --fuzzy $F backup.openstreetmap.org::backup
rm -f $F
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B <%= @name %>-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B otrs-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
- rsync /var/log/apache2/planet.openstreetmap.org-access.log.2.gz ironbelly::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.gz
+ rsync --preallocate /var/log/apache2/planet.openstreetmap.org-access.log.2.gz ironbelly::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.gz
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B sotm-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --directory=$T --file=$T/$B svn-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
export GZIP="--rsyncable -9"
nice tar --create --gzip --dereference --directory=$T --file=$T/$B switch2osm-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
endscript
lastaction
- /usr/bin/rsync /var/log/squid/zere.log.1.xz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-1 days" +%Y-%m-%d`.xz || true
+ /usr/bin/rsync --preallocate /var/log/squid/zere.log.1.xz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-1 days" +%Y-%m-%d`.xz || true
endscript
}
export RSYNC_RSH="ssh -ax"
nice tar --create --gzip --directory=$T --file=$T/$B trac-$D
-nice rsync $T/$B backup::backup
+nice rsync --preallocate --fuzzy $T/$B backup::backup
rm -rf $T
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
- /usr/bin/rsync /var/log/apache2/access.log.2.gz ironbelly::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+ /usr/bin/rsync --preallocate /var/log/apache2/access.log.2.gz ironbelly::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
endscript
}
<%= node[:web][:log_directory] %>/*.log {
daily
missingok
- rotate 7
+ rotate 7
compress
delaycompress
notifempty
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
/bin/systemctl reload cgimap
- /usr/bin/rsync <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+ /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
<% end -%>
endscript
}