docs: add docs on restoring to PSQL server (#1584)

* docs: add docs on restoring to PSQL server

* prevent iframe in netlify site
This commit is contained in:
Hayden authored and GitHub committed 2022-08-20 11:53:48 -08:00
1 parent 74548e9152
commit 007b861ad6
5 files changed
+56 -3

No files matched your search

@@ -0,0 +1,37 @@
# Backups and Restoring
Mealie provides an integrated mechanics for doing full installation backups of the database. Naviate to `/admin/backups` to
- See a list of available backups
- Perform a backups
- Restore a backup
!!! tip
If you're using Mealie with SQLite all your data is stored in the /app/data/ folder in the container. You can easily perform entire site backups by stopping the container, and backing up this folder with your chosen tool. This is the **best** way to backup your data.
## Restoring from a Backup
To restore from a backup it needs to be uploaded to your instance, this can be done through the web portal. On the lower left hand corner of the backups data table you'll see an upload button. Click this button and select the backup file you want to upload and it will be available to import shortly.
Before importing it's critical that you understand the following:
- This is a destructive action and will delete all data in the database
- This action cannot be undone
- If this action is successful you will be logged out and you will need to log back in to complete the restore
!!! warning
Prior to beta-v5 using a mis-matched version of the database backup will result in an error that will prevent you from using the instance of Mealie requiring you to remove all data and reinstall. Post beta-v5 performing a mismatched restore will throw an error and alert the user of the issue.
### Postgres Note
Restoring the Database when using Postgres requires Mealie to be configured with a postgres **superuser** account. This is due to our usage of massive deleting of data in the database and temporarily setting roles to perform the restore. To perform a restoration on Postgres you will need to _temporarily_ set the Mealie user to a superuser account.
```sql
ALTER USER mealie WITH SUPERUSER;
# Run restore from Mealie
ALTER USER mealie WITH NOSUPERUSER;
```
For more information see [GitHub Issue #1500](https://github.com/hay-kot/mealie/issues/1500)
+1 -1
View File
@@ -14,7 +14,7 @@
<div id="redoc-container"></div>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
<script>
var spec = {"openapi": "3.0.2", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the [API Usage | Mealie Docs](https://hay-kot.github.io/mealie/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nAs of this release <b>v1.0.0beta-3</b>, Mealie is still in rapid development and therefore some of these APIs may change from version to version.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other community members.\nIf you'd like to file an issue, please use the [GitHub Issue Tracker | Mealie](https://github.com/hay-kot/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://hay-kot.github.io/mealie/)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n- [Beta](https://beta.mealie.io)\n\n\n", "version": "v1.0.0beta-3"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/self": {"get": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Get Logged In User", "operationId": "get_logged_in_user_api_users_self_get", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/{item_id}": {"get": {"tags": ["Users: Admin CRUD", "Users: Admin CRUD"], "summary": "Get User", "operationId": "get_user_api_users__item_id__get", "parameters": [{"required": true, "schema": {"title": "Item Id", "type": "string", "format": "uuid4"}, "name": "item_id", "in": "path"}, {"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Update User", "operationId": "update_user_api_users__item_id__put", "parameters": [{"required": true, "schema": {"title": "Item Id", "type": "string", "format": "uuid4"}, "name": "item_id", "in": "path"}, {"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema"Line truncated
var spec = {"openapi": "3.0.2", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the [API Usage | Mealie Docs](https://hay-kot.github.io/mealie/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nAs of this release <b>v1.0.0beta-4</b>, Mealie is still in rapid development and therefore some of these APIs may change from version to version.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other community members.\nIf you'd like to file an issue, please use the [GitHub Issue Tracker | Mealie](https://github.com/hay-kot/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://hay-kot.github.io/mealie/)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n- [Beta](https://beta.mealie.io)\n\n\n", "version": "v1.0.0beta-4"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/self": {"get": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Get Logged In User", "operationId": "get_logged_in_user_api_users_self_get", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/password": {"put": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Update Password", "description": "Resets the User Password", "operationId": "update_password_api_users_password_put", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChangePassword"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/{item_id}": {"get": {"tags": ["Users: Admin CRUD", "Users: Admin CRUD"], "summary": "Get User", "operationId": "get_user_api_users__item_id__get", "parameters": [{"required": true, "schema": {"title": "Item Id", "type": "string", "format": "uuid4"}, "name": "item_id", "in": "path"}, {"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": Line truncated
Redoc.init(spec, {}, document.getElementById("redoc-container"));
</script>