Skip to content

Commit

Permalink
Merge pull request #35 from matskiv/INTLY-1343
Browse files Browse the repository at this point in the history
INTLY-1343: Change timestamp format to avoid issues with tar
  • Loading branch information
matskiv committed Mar 22, 2019
2 parents f6adf54 + 7504906 commit d51e926
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion image/tools/lib/component/3scale-redis.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function component_dump_data {
local ts=$(date '+%H:%M:%S')
local ts=$(date '+%H_%M_%S')
dest_file="$1/archives/dump-${ts}.rdb"
dump_rdb_path="/var/lib/redis/data/dump.rdb"

Expand Down
2 changes: 1 addition & 1 deletion image/tools/lib/component/codeready_pv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function component_dump_data {
dump_dest="/tmp/codeready-data"
mkdir -p $dump_dest
for i in $workspace_pods; do dump_pod_data $i $dump_dest; done
local ts=$(date '+%H:%M:%S')
local ts=$(date '+%H_%M_%S')
tar -zcvf "$archive_path/codeready-pv-data-${ts}.tar.gz" -C $dump_dest .
rm -rf $dump_dest
fi
Expand Down
2 changes: 1 addition & 1 deletion image/tools/lib/component/enmasse_pv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function component_dump_data {

ls ${dump_dest}/*
if [[ $? -eq 0 ]]; then
local ts=$(date '+%H:%M:%S')
local ts=$(date '+%H_%M_%S')
tar -zcvf "$archive_path/enmasse-pv-data-${ts}.tar.gz" -C $dump_dest .
rm -rf $dump_dest
else
Expand Down
2 changes: 1 addition & 1 deletion image/tools/lib/component/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function component_dump_data {
databases=$(mysql -h${MYSQL_HOST} -u${MYSQL_USER} -p${MYSQL_PASSWORD} -e 'SHOW DATABASES' | tail -n+2 | grep -v information_schema)

for database in ${databases}; do
local ts=$(date '+%H:%M:%S')
local ts=$(date '+%H_%M_%S')
mysqldump --single-transaction -h${MYSQL_HOST} -u${MYSQL_USER} -p${MYSQL_PASSWORD} -R ${database} | gzip > ${dest}/archives/${database}-${ts}.dump.gz
local rc=$?
if [[ ${rc} -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion image/tools/lib/component/postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function component_dump_data {

echo "*:5432:*:${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}" > ~/.pgpass
chmod 0600 ~/.pgpass
ts=$(date '+%H:%M:%S')
ts=$(date '+%H_%M_%S')
export PGPASSFILE=~/.pgpass
namespace=${POSTGRES_HOST#*.}
namespace=${namespace%.*}
Expand Down
2 changes: 1 addition & 1 deletion image/tools/lib/component/resources.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TS=$(date '+%H:%M:%S')
TS=$(date '+%H_%M_%S')

function get_middleware_namespaces {
echo "`oc get namespaces --selector='integreatly-middleware-service=true' -o jsonpath='{.items[*].metadata.name}'`"
Expand Down

0 comments on commit d51e926

Please sign in to comment.