kbaum / heroku-database-backups

Heroku database backups and copies to S3
MIT License
99 stars 82 forks source link

breaks with the heroku-20 stack #27

Closed richardbrockie closed 3 years ago

richardbrockie commented 3 years ago

Everything works fine with the heroku-18 stack. heroku-20 is complaining.

Maybe a good time to move to aws cli v2? (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html)

From the console in a one-off dyno with heroku-20:

~ $ APP=<my-app> DATABASE=<my-postgresql-db> /app/bin/backup.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.6M  100 16.6M    0     0  31.8M      0 --:--:-- --:--:-- --:--:-- 31.7M
Archive:  awscli-bundle.zip
  inflating: awscli-bundle/install   
  inflating: awscli-bundle/packages/jmespath-0.10.0.tar.gz  
  inflating: awscli-bundle/packages/python-dateutil-2.8.0.tar.gz  
  inflating: awscli-bundle/packages/PyYAML-5.3.1.tar.gz  
  inflating: awscli-bundle/packages/colorama-0.4.3.tar.gz  
  inflating: awscli-bundle/packages/colorama-0.4.1.tar.gz  
  inflating: awscli-bundle/packages/s3transfer-0.3.3.tar.gz  
  inflating: awscli-bundle/packages/PyYAML-5.2.tar.gz  
  inflating: awscli-bundle/packages/futures-3.3.0.tar.gz  
  inflating: awscli-bundle/packages/urllib3-1.26.2.tar.gz  
  inflating: awscli-bundle/packages/awscli-1.18.188.tar.gz  
  inflating: awscli-bundle/packages/docutils-0.15.2.tar.gz  
  inflating: awscli-bundle/packages/six-1.15.0.tar.gz  
  inflating: awscli-bundle/packages/botocore-1.19.28.tar.gz  
  inflating: awscli-bundle/packages/rsa-3.4.2.tar.gz  
  inflating: awscli-bundle/packages/virtualenv-16.7.8.tar.gz  
  inflating: awscli-bundle/packages/pyasn1-0.4.8.tar.gz  
  inflating: awscli-bundle/packages/urllib3-1.25.7.tar.gz  
  inflating: awscli-bundle/packages/setup/wheel-0.33.6.tar.gz  
  inflating: awscli-bundle/packages/setup/setuptools_scm-3.3.3.tar.gz  
Running cmd: /usr/bin/python -m venv /tmp/aws
Traceback (most recent call last):
  File "./awscli-bundle/install", line 247, in <module>
    main()
  File "./awscli-bundle/install", line 223, in main
    create_install_structure(working_dir, opts.install_dir)
  File "./awscli-bundle/install", line 88, in create_install_structure
    create_virtualenv(location=install_dir, working_dir=working_dir)
  File "./awscli-bundle/install", line 95, in _create_virtualenv_internal
    run('%s -m venv %s' % (sys.executable, location))
  File "./awscli-bundle/install", line 67, in run
    raise BadRCError("Bad rc (%s) for cmd '%s': %s" % (
__main__.BadRCError: Bad rc (1) for cmd '/usr/bin/python -m venv /tmp/aws': The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/tmp/aws/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']