Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using BACKUP_NAME with empty BACKUP_PREFIX doesn't work at all #16

Open
firehist opened this issue Sep 12, 2016 · 1 comment
Open

Using BACKUP_NAME with empty BACKUP_PREFIX doesn't work at all #16

firehist opened this issue Sep 12, 2016 · 1 comment
Assignees
Labels

Comments

@firehist
Copy link
Collaborator


testIt () {
  local backupPrefix=$1
  local backupName=$2
  local name=''

  if [ -n "$backupName" ]; then
    name="1"
  else
    name="2"
  fi
  echo "$name"
}

BACKUP_PREFIX=
BACKUP_NAME=jenkins

echo $(test $BACKUP_PREFIX $BACKUP_NAME)
# Ouput 2

BACKUP_PREFIX="beurk"
echo $(test $BACKUP_PREFIX $BACKUP_NAME)
# Output 1
@firehist firehist self-assigned this Sep 12, 2016
@frekele frekele added this to the v0.3.0-rc-1 milestone Sep 17, 2016
@frekele frekele added the bug label Sep 17, 2016
@luishdez
Copy link
Contributor

luishdez commented Jan 2, 2017

I've made that PR. The idea is if that you define $BACKUP_NAME it overrides everything else. So it will end $BACKUP_NAME.tar.gz (pretty useful if you use S3 versions) with life cycles. So it doesn't make to define $BACKUP_PREFIX and $BACKUP_NAME at the same time.

Maybe it's confusing and should warn that PREFIX shouldn't be defined …

Currently I'm using this in prod with no problem

docker run --rm \
--env-file .env-backup \
-v atlassian_db:/data/db:ro \
-v atlassian_jira:/data/jira:ro \
-v atlassian_confluence:/data/confluence:ro \
--name backup helicopterizer backup --tarball

Starting Helicopterizer ...
Cloud Provider is Amazon Simple Storage Service (S3)
STORAGE_PROVIDER=AWS
BACKUP_NAME=docker-atlassian
BACKUP_VERSION=
DATA_PATH=/data/
CRON_SCHEDULE=
GZIP_COMPRESSION=true
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET_NAME=
AWS_DEFAULT_REGION=us-east-1
AWS_S3_PATH=/
AWS_S3_OPTIONS=
Starting Tarball Backup to AWS ...
Starting compress: /data/ to /tmp/docker-atlassian.tar.gz

@frekele frekele modified the milestones: v0.3.0-rc-2, v0.3.0-rc-1 Jan 11, 2017
@frekele frekele modified the milestones: v0.3.0-rc-2, v0.4.0-alpha-1 Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants