[Docker][Ubuntu]Redashバージョンアップ

LINEで送る
Pocket

  • DBをバックアップする
$ sudo su -
# df -h 
# cd /opt/redash
# pg_dump -h redash.xxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com -U redash -d redash | gzip >  redash_$(date +%Y%m%d).sql.gz
  • バージョンアップ
# vim docker-compose.yml
image: redash/redash:8.0.0.b32245 #627 変更

# docker-compose stop server scheduler scheduled_worker adhoc_worker
# docker-compose run --rm server manage db upgrade
# docker-compose down
# docker-compose up -d

元に戻す場合

  • テーブルの削除
# psql -h redash.xxxxxxxxx.ap-northeast-1.rds.amazonaws.com -U redash -d redash
drop table access_permissions;
drop table alembic_version;
drop table alert_subscriptions;
drop table alerts;
drop table api_keys;
drop table changes;
drop table widgets;
drop table visualizations;
drop table query_snippets;
drop table queries;
drop table query_results;
drop table data_source_groups;
drop table data_sources;
drop table events;
drop table favorites;
drop table groups;
drop table notification_destinations;
drop table users;
drop table dashboards;
drop table users;
drop table organizations;
  • リストア
# gzip -cd redash_$(date +%Y%m%d).sql.gz  |  psql -h redash.xxxxxxxxxx.ap-northeast-1.rds.amazonaws.com -U redash -d redash

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *