- Go to https://www.cloudflare.com/developer-platform/r2/ and create an account
- Create a bucket in R2 (make sure it is not public)
- Go to "Manage R2 API Tokens" and generate a token for your own bucket. Keep that around to add it to your environment variables
Configure your environment with environment variables that are shown in .env.sample
.
cp .env.sample .env
Install pg_dump on the machine where you plan to run this script
pg_dump does not allow to directly specify the password.
So you should configure the password using .pgpass
file.
bundle exec ruby run.rb --name DB_NAME`