Skip to content

Commit

Permalink
Upgraded S3 backup virtualenv to Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Apr 1, 2020
1 parent fcbb5d1 commit 2d78e3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions mongo/toggle-backup-activation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ else

if [ "$USE_S3" -eq "$TRUE" ]; then
echo "Installing virtualenv for Mongo backup on S3..."
apt-get install -y s3cmd --quiet=2 > /dev/null
apt-get install -y python-virtualenv --quiet=2 > /dev/null
virtualenv /tmp/backup-virtualenv
apt-get install -y python3-pip --quiet=2 > /dev/null
python3 -m pip install --upgrade --quiet pip
python3 -m pip install --upgrade --quiet virtualenv
python3 -m pip install --quiet s3cmd
virtualenv --quiet -p /usr/bin/python3 /tmp/backup-virtualenv
. /tmp/backup-virtualenv/bin/activate
pip install --quiet boto
deactivate
Expand Down
8 changes: 5 additions & 3 deletions postgres/toggle-backup-activation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ else

if [ "$USE_S3" -eq "$TRUE" ]; then
echo "Installing virtualenv for PostgreSQL backup on S3..."
apt-get install -y s3cmd --quiet=2 > /dev/null
apt-get install -y python-virtualenv --quiet=2 > /dev/null
virtualenv /tmp/backup-virtualenv
apt-get install -y python3-pip --quiet=2 > /dev/null
python3 -m pip install --upgrade --quiet pip
python3 -m pip install --upgrade --quiet virtualenv
python3 -m pip install --quiet s3cmd
virtualenv --quiet -p /usr/bin/python3 /tmp/backup-virtualenv
. /tmp/backup-virtualenv/bin/activate
pip install --quiet humanize smart-open==1.7.1
deactivate
Expand Down

0 comments on commit 2d78e3e

Please sign in to comment.