timescale / timescaledb-wale

Dockerized WAL-E with an HTTP API
Apache License 2.0
21 stars 9 forks source link

Timescale wale waiting to start #1

Open twalk4821 opened 6 years ago

twalk4821 commented 6 years ago

Hi Guys -

I am working with two docker containers: the first being your official timescale container and the second being this wale sidecar. What I am trying to accomplish is daily backups using a google cloud bucket.

My steps so far have been thus:

  1. Create a google application credentials json
  2. Reference this json in a .env file. My .env file looks like this: PGDATA=/media/timescale-data/pgdata PGCONF_BACKUP_DIR=/media/timescale-data/pgconf START_MODE=BACKUP_PUSH WALE_GS_PREFIX=gs://walbackups/timescale GOOGLE_APPLICATION_CREDENTIALS=./service_account.json
  3. Next I run the wale container with this command: sudo docker run -v TimescaleVolume:/media/timescale --env-file=.env timescale/timescaledb -wale
  4. I mounted a persistent volume to persisent the data through container restarts (this works)
  5. Finally I try starting the timescale container, referencing the same env file and volume: sudo docker run -d -p 5434:5432 -v TimescaleVolume:/media/timescale-data --env-file .env timescale/timescaledb

Are there any obvious steps I am missing? I did not modify any postgres configuration files. Perhaps that is what I am missing.

Thanks a lot for your help, Tyler

twalk4821 commented 6 years ago

Update: It seems env variables are not being passed in properly: After trying this command: sudo docker exec be6ab0b6cbb0 wal-e backup-list I get: ERROR MSG: no storage prefix defined HINT: Either set one of the --wabs-prefix or --s3-prefix options or define one of the WALE_WABS_PREFIX, WAL E_S3_PREFIX, or WALE_SWIFT_PREFIX environment variables. I tried passing in the WALE_GS_PREFIX specifically through -e WALE_GS_PREFIX=gs://walbackups/timescale Any clue why this would be? Is GS not supported by your container? Thanks.

twalk4821 commented 6 years ago

Ok I definitely need to add a WALE_INIT_LOCKFILE. will update after trying this.

twalk4821 commented 6 years ago

Yes I am still getting the same error: ERROR MSG: no storage prefix defined HINT: Either set one of the --wabs-prefix or --s3-prefix options or define one of the WALE_WABS_PREFIX, WAL E_S3_PREFIX, or WALE_SWIFT_PREFIX environment variables. Clearly the env file is being read, but is not parsing the WALE_GS_PREFIX var

twalk4821 commented 6 years ago

I think this image is not supporting GS. I can see from the original code base that GS storage was only recently added.

erimatnor commented 6 years ago

Hi @twalk4821 we have a PR to simplify how this image works. Stay tuned.