BackupNexus
Backup management for Rails applications, extracted from RailsNexus.
BackupNexus keeps the same RailsNexus layout and stylesheet while owning the backup dashboard, database models, backup runner, generators, migrations, and rake tasks in a separate gem.
Installation
gem "rails_nexus"
gem "backup_nexus"
Run the installer:
bin/rails generate backup_nexus:install
bin/rails db:migrate
The installer mounts the engine at /backup_nexus. Configure authorization
through RailsNexus.configure, then enable the backup dashboard:
BackupNexus.configure do |config|
config.enabled = true
end
Run the safe example seed with:
bundle exec rake backup_nexus:seed_backups
The migration renames legacy rails_nexus_backups and
rails_nexus_backup_configs tables when they exist, preserving existing
backup records during the extraction.
Official Backup gem integration
BackupNexus includes its existing safe native runner by default and also generates models compatible with the official Backup DSL. The upstream project is not currently under active development and targets older Rails dependencies, so it remains optional instead of being a hard runtime dependency.
To use the DSL templates:
gem "backup", "~> 4.4"
Then run:
bin/rails generate backup_nexus:backup
bundle exec backup perform -t daily_backup
Development
bundle exec rails test
bundle exec rake test
gem build backup_nexus.gemspec
CI/CD
GitHub Actions runs the test suite on pushes and pull requests. A matching version tag publishes the gem to RubyGems and creates a GitHub release.
Set the RubyGems account's MFA level to UI and gem signin, then create an
API key with only the Push rubygems scope, limited to the backup_nexus
gem. Leave MFA disabled for this CI key so RubyGems does not request a one-time
password during automated releases. Add the key to the GitHub repository (or
its release environment) as an Actions secret named RUBYGEMS_API_KEY.
Never commit the key to the repository.
For the first publication, RubyGems cannot limit the key to backup_nexus
until the gem exists. Use a push-only key without a gem limit for that first
release, then revoke it and replace the GitHub secret with a new key limited to
backup_nexus.
The publish command has no interactive input. A missing key or an account/key that requires API MFA therefore fails the release instead of waiting for an OTP prompt.
To release a version, update lib/backup_nexus/version.rb, merge the change to
main, and push a matching tag such as v0.1.1.