# API setting backup

**URL:** <https://community.dreamfactory.com/t/api-setting-backup/5571>\
**Category:** Authentication & Security\
**Created:** [October 22, 2024, 8:12am UTC](https://community.dreamfactory.com/t/api-setting-backup/5571 "2024-10-22T08:12:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Adam](https://community.dreamfactory.com/u/Adam)\
**Post date:** [October 22, 2024, 8:12am UTC](https://community.dreamfactory.com/t/api-setting-backup/5571/1 "2024-10-22T08:12:27Z")

</div>

Does anyone know how to back up and restore settings related to role-based access and API keys? It seems that there is no relevant description in the documentation.

Thanks!

ps. I deploy the DreamFactory of version v6 by docker-compose.

---

<div class="post-metadata">

**Author:** ![jacob\_yi\_df](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jacob\_yi\_df](https://community.dreamfactory.com/u/jacob_yi_df)\
**Post date:** [February 25, 2025, 11:11pm UTC](https://community.dreamfactory.com/t/api-setting-backup/5571/2 "2025-02-25T23:11:30Z")

</div>

Hey!

Since you’re using **Docker with PostgreSQL** , back up the database using pg\_dump:

**Run the following command inside your host machine:**

`docker exec -t postgres pg_dump -U dreamfactory -d dreamfactory -c -f /backup/dreamfactory_roles_api_keys.sql`

_(Adjust the database user and name if needed.)_

This creates a backup file containing the settings.
