Skip to content

FEATURE: Add utilities for importing and exporting backups #32992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 11, 2025
Merged

Conversation

nbianca
Copy link
Member

@nbianca nbianca commented May 29, 2025

This commit introduces new features and utilities related to the backup
and restore system that make use of remote URLs:

  • discourse restore accepts a URL to a backup file

  • discourse backup_url generates a URL of a backup file (S3 only)

  • discourse import_backup_url downloads a backup file from a URL to
    the configured backup store

This can be used to move content between two Discourse instances by
backing up the entire site, copying the backup URL, importing or
restoring it on the other instance.

@nbianca nbianca marked this pull request as draft May 30, 2025 07:50
@nbianca nbianca changed the title Add utilities for backups and remote URLs FEATURE: Add utilities for backups and remote URLs Jun 2, 2025
@nbianca nbianca marked this pull request as ready for review June 3, 2025 20:10
@nbianca nbianca force-pushed the backup-urls branch 2 times, most recently from 62a34bf to d0b852a Compare June 4, 2025 21:12
@nbianca nbianca changed the title FEATURE: Add utilities for backups and remote URLs FEATURE: Add utilities for importing and exporting backups Jun 4, 2025
@nbianca nbianca requested a review from tgxworld June 5, 2025 21:28
Copy link
Contributor

@tgxworld tgxworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

nbianca added 8 commits June 11, 2025 12:45
This commit introduces two new utilities related to the backup and
restore system that make use of remote URLs:

- `discourse export_backup` generates a URL of a backup file

- `discourse import_backup` downloads a backup file from a URL to the
  configured backup store

This can be used to move content between two Discourse instances by
backing up the entire site, exporting the backup, importing it on the
other instance and restoring it.
This commit amends the current implementation of `BackupRestore::Restorer`
to accept a URL to a backup file, that is downloaded and then restored.
@nbianca nbianca merged commit 1f2efa7 into main Jun 11, 2025
17 checks passed
@nbianca nbianca deleted the backup-urls branch June 11, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants