Baklite

Login

How to setup Baklite on Ruby on Rails

To back up your first database start by installing our gem.

bundle add rails-baklite

Then run the following command in your Rails project.

bundle exec rails generate baklite

This will configure Baklite in your project. We now need to set up your account secret key on your application.

Open your credentials file by running the following command and add the lines shown below.

bundle exec rails credentials:edit
baklite:
  token: <SIGN_UP_AND_GET_YOUR_API_KEY>

Save the file and close the editor.

Finally, run the following command to back up your database.

bundle exec rails baklite:backup

You can also create backups from your Ruby code by calling the following method. This is useful if you want to create backups from a cron job or a background job.

Rails::Baklite.backup