From: Tom Hughes Date: Thu, 13 Aug 2020 17:53:22 +0000 (+0100) Subject: Avoid use of deprecated GZIP environment variable X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/6accbe964d9196c8f5b3e8685b10f38b990da6b7 Avoid use of deprecated GZIP environment variable --- diff --git a/cookbooks/blog/templates/default/backup.cron.erb b/cookbooks/blog/templates/default/backup.cron.erb index 557440ff4..59e91f752 100644 --- a/cookbooks/blog/templates/default/backup.cron.erb +++ b/cookbooks/blog/templates/default/backup.cron.erb @@ -13,10 +13,9 @@ echo 'password=<%= @passwords["osm-blog-user"] %>' >> $T/mysqldump.opts mysqldump --defaults-file=$T/mysqldump.opts --opt osm-blog > $T/osm-blog-$D/osm-blog.sql ln -s /srv/blog.openstreetmap.org $T/osm-blog-$D/www -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --warning=no-file-changed --file=$T/$B osm-blog-$D +nice tar --create --dereference --directory=$T --warning=no-file-changed osm-blog-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/chef/templates/default/server-backup.cron.erb b/cookbooks/chef/templates/default/server-backup.cron.erb index 048bc99e9..04e6c0e0c 100644 --- a/cookbooks/chef/templates/default/server-backup.cron.erb +++ b/cookbooks/chef/templates/default/server-backup.cron.erb @@ -10,9 +10,7 @@ chmod g+rwx $T $T/chef-server-$D sudo -u opscode-pgsql /opt/opscode/embedded/bin/pg_dumpall --file=$T/chef-server-$D/chef.dmp --clean ln -s /var/opt/opscode/bookshelf/data $T/chef-server-$D/bookshelf -export GZIP="--rsyncable -9" - -nice tar --create --gzip --dereference --directory=$T --file=$T/$B chef-server-$D +nice tar --create --dereference --directory=$T chef-server-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/civicrm/templates/default/backup.cron.erb b/cookbooks/civicrm/templates/default/backup.cron.erb index 61bb4cd45..21d85753a 100644 --- a/cookbooks/civicrm/templates/default/backup.cron.erb +++ b/cookbooks/civicrm/templates/default/backup.cron.erb @@ -13,10 +13,9 @@ echo 'password=<%= @passwords["database"] %>' >> $T/mysqldump.opts mysqldump --defaults-file=$T/mysqldump.opts --opt --skip-lock-tables civicrm > $T/osmf-crm-$D/civicrm.sql ln -s /srv/join.osmfoundation.org $T/osmf-crm-$D/www -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B osmf-crm-$D +nice tar --create --dereference --directory=$T osmf-crm-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/donate/templates/default/backup.cron.erb b/cookbooks/donate/templates/default/backup.cron.erb index 92b66cf00..cf7e114b4 100644 --- a/cookbooks/donate/templates/default/backup.cron.erb +++ b/cookbooks/donate/templates/default/backup.cron.erb @@ -13,10 +13,9 @@ echo 'password=<%= @passwords["database"] %>' >> $T/mysqldump.opts mysqldump --defaults-file=$T/mysqldump.opts --opt donate > $T/osm-donate-$D/osm-donate.sql ln -s /srv/donate.openstreetmap.org $T/osm-donate-$D/www -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B osm-donate-$D +nice tar --create --dereference --directory=$T osm-donate-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/forum/templates/default/backup.cron.erb b/cookbooks/forum/templates/default/backup.cron.erb index c3475b876..db4f0b412 100644 --- a/cookbooks/forum/templates/default/backup.cron.erb +++ b/cookbooks/forum/templates/default/backup.cron.erb @@ -13,10 +13,9 @@ echo 'password=<%= @passwords["database"] %>' >> $T/mysqldump.opts mysqldump --defaults-file=$T/mysqldump.opts --opt forum > $T/forum-$D/forum.sql ln -s /srv/forum.openstreetmap.org $T/forum-$D/www -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B forum-$D +nice tar --create --dereference --directory=$T forum-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/git/templates/default/backup.cron.erb b/cookbooks/git/templates/default/backup.cron.erb index 5a9d01284..63882720f 100644 --- a/cookbooks/git/templates/default/backup.cron.erb +++ b/cookbooks/git/templates/default/backup.cron.erb @@ -8,10 +8,9 @@ B=git-$D.tar.gz ln -s /var/lib/git $T/git-$D -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B git-$D +nice tar --create --dereference --directory=$T git-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/mailman/templates/default/backup.cron.erb b/cookbooks/mailman/templates/default/backup.cron.erb index 12a550c03..25c1f7cab 100644 --- a/cookbooks/mailman/templates/default/backup.cron.erb +++ b/cookbooks/mailman/templates/default/backup.cron.erb @@ -9,10 +9,9 @@ B=lists-$D.tar.gz mkdir $T/lists-$D ln -s /var/lib/mailman $T/lists-$D/mailman -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B lists-$D +nice tar --create --dereference --directory=$T lists-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb index ff28a185c..cd6f3c6e4 100755 --- a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb +++ b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb @@ -9,8 +9,7 @@ echo 'user=<%= @database_params[:username] %>' >> $T/mysqldump.opts echo 'password=<%= @database_params[:password] %>' >> $T/mysqldump.opts mysqldump --defaults-file=$T/mysqldump.opts --opt --skip-lock-tables --single-transaction "<%= @database_params[:name] %>" | lz4 -9 > $T/wiki-<%= @name %>-$D/wiki.sql.lz4 ln -s <%= @directory %> $T/wiki-<%= @name %>-$D/www -export GZIP="--rsyncable -9" #make backup rsyncable -nice tar --create --gzip --dereference --directory=$T --warning=no-file-changed --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 tar --create --dereference --directory=$T --warning=no-file-changed --exclude=wiki-<%= @name %>-$D/www/w/images/thumb --exclude=wiki-<%= @name %>-$D/www/w/.git --exclude=wiki-<%= @name %>-$D/www/w/extensions/*/.git wiki-<%= @name %>-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/munin/templates/default/backup.cron.erb b/cookbooks/munin/templates/default/backup.cron.erb index 6b8460577..a8d3a5671 100644 --- a/cookbooks/munin/templates/default/backup.cron.erb +++ b/cookbooks/munin/templates/default/backup.cron.erb @@ -10,10 +10,9 @@ mkdir $T/munin-$D ln -s /var/lib/munin/openstreetmap $T/munin-$D ln -s /var/lib/munin/*.storable $T/munin-$D -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B munin-$D +nice tar --create --dereference --directory=$T munin-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/osqa/templates/default/backup.cron.erb b/cookbooks/osqa/templates/default/backup.cron.erb index 3c2abf6a7..020a03549 100644 --- a/cookbooks/osqa/templates/default/backup.cron.erb +++ b/cookbooks/osqa/templates/default/backup.cron.erb @@ -12,10 +12,9 @@ chown <%= @user %> $T/osqa-$D sudo -u <%= @user %> pg_dump --format=custom --file=$T/<%= @name %>-$D/osqa.dmp <%= @database %> ln -s <%= @directory %>/upfiles $T/<%= @name %>-$D/upfiles -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B <%= @name %>-$D +nice tar --create --dereference --directory=$T <%= @name %>-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/otrs/templates/default/backup.cron.erb b/cookbooks/otrs/templates/default/backup.cron.erb index bfe5242af..aecce1c64 100644 --- a/cookbooks/otrs/templates/default/backup.cron.erb +++ b/cookbooks/otrs/templates/default/backup.cron.erb @@ -13,10 +13,9 @@ sudo -u otrs pg_dump --file=$T/otrs-$D/otrs.dmp otrs ln -s /opt/otrs $T/otrs-$D/otrs ln -s /etc/apache2/sites-available/otrs.openstreetmap.org.conf $T/otrs-$D/apache2-otrs.openstreetmap.org.conf -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B otrs-$D +nice tar --create --dereference --directory=$T otrs-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/stateofthemap/templates/default/backup.cron.erb b/cookbooks/stateofthemap/templates/default/backup.cron.erb index cb7171b6f..0b459d52c 100644 --- a/cookbooks/stateofthemap/templates/default/backup.cron.erb +++ b/cookbooks/stateofthemap/templates/default/backup.cron.erb @@ -23,10 +23,9 @@ ln -s /srv/2011.stateofthemap.org $T/sotm-$D/www2011 ln -s /srv/2012.stateofthemap.org $T/sotm-$D/www2012 ln -s /srv/2016.stateofthemap.org $T/sotm-$D/www2016 -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=$T --file=$T/$B sotm-$D +nice tar --create --dereference --directory=$T sotm-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/subversion/templates/default/backup.cron.erb b/cookbooks/subversion/templates/default/backup.cron.erb index df7b4fe28..d82348da8 100644 --- a/cookbooks/subversion/templates/default/backup.cron.erb +++ b/cookbooks/subversion/templates/default/backup.cron.erb @@ -8,10 +8,9 @@ B=svn-$D.tar.gz nice svnadmin hotcopy /var/lib/subversion/repos/openstreetmap $T/svn-$D > /dev/null -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --directory=$T --file=$T/$B svn-$D +nice tar --create --directory=$T svn-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T diff --git a/cookbooks/trac/templates/default/backup.cron.erb b/cookbooks/trac/templates/default/backup.cron.erb index e4e4bd8d6..328d8e53c 100644 --- a/cookbooks/trac/templates/default/backup.cron.erb +++ b/cookbooks/trac/templates/default/backup.cron.erb @@ -8,10 +8,9 @@ B=trac-$D.tar.gz trac-admin /var/lib/trac hotcopy $T/trac-$D > /dev/null -export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --directory=$T --file=$T/$B trac-$D +nice tar --create --directory=$T trac-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T