GitHub user dosubot[bot] added a comment to the discussion: backup
<!-- Greeting --> Hi @abhinavty123! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> You can back up all your Superset data, but there are a few things to know. Superset stores everything—including charts, dashboards, datasets, users, roles, and permissions—in its metadata database (like PostgreSQL, MySQL, or SQLite). The only way to get a full backup (including users, roles, and permissions) is to back up this entire metadata database using your database's backup tools (for example, `pg_dump` for PostgreSQL or `mysqldump` for MySQL) [source](https://github.com/apache/superset/blob/ef14a5fbb47a540b0c91f40fa397fa9c6d18fa2d/superset/cli/importexport.py). Superset also provides CLI commands to export/import dashboards and datasets as ZIP files (`superset export_dashboards`, `superset export_datasources`, `superset import_dashboards`, `superset import_datasources`). These are useful for migrating or sharing dashboards and datasets, but they do not include users, roles, or permissions [source](https://github.com/apache/superset/blob/ef14a5fbb47a540b0c91f40fa397fa9c6d18fa2d/superset/cli/importexport.py). When restoring, you may need to manually reassign ownership of dashboards and datasets, since user IDs are not automatically mapped during import. Also, if you use the web UI or API for imports, there are file size limits (100 MB ZIP, 200:1 compression ratio), but the CLI bypasses these limits [source](https://github.com/apache/superset/discussions/34022). So, for a full backup: dump your metadata database. For dashboard/dataset migration: use the CLI export/import commands. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0beac079-ed5f-453d-a21a-ef21b8827b1b?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34068) GitHub link: https://github.com/apache/superset/discussions/34068#discussioncomment-13662567 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
