recipya icon indicating copy to clipboard operation
recipya copied to clipboard

How to automaticaly generate the json backup

Open pihomeserver opened this issue 1 year ago • 4 comments

My instance is running in docker and i would like to make regular backups of the recipies

Is there a way to automate or from command line to generate the zip file like the command in the Settings window, Data tab, Export option ?

pihomeserver avatar Mar 26 '25 09:03 pihomeserver

Here's the page that details the backups: https://recipya.musicavis.ca/docs/features/backups.

They are done automatically once every three days and are stored in the volume's Backup folder. The user currently cannot trigger backups manually.

reaper47 avatar Mar 26 '25 11:03 reaper47

Then i'm lost how to restore the backup. I've tried to restore one (that includes 4 folders), restarted the container but recipes are not displayed

pihomeserver avatar Mar 26 '25 14:03 pihomeserver

I confirm that restoring the latest backup following the process in the doc does not restore recipies I guess that the DB backup has a problem because the startup of the up generated the DB content :

Attaching to recipya
recipya  | Fetching the FDC database (62.6 MB)
recipya  | Environment variables ok
recipya  | OK FFmpeg is installed
recipya  | Recipya is properly set up
recipya  | File locations:
recipya  |      - Backups: /home/recipya/.config/Recipya/Backup
recipya  |      - Database: /home/recipya/.config/Recipya/Database
recipya  |      - Images: /home/recipya/.config/Recipya/Images
recipya  |      - Logs: /home/recipya/.config/Recipya/Logs
recipya  |      - Videos: /home/recipya/.config/Recipya/Videos
recipya  | 2025/03/26 15:37:18 OK   20221227180503_init.sql (1.51ms)
recipya  | 2025/03/26 15:37:18 OK   20230522154229_websites.sql (5.71ms)
recipya  | 2025/03/26 15:37:18 OK   20230609214207_add_recipes.sql (9.87ms)
recipya  | 2025/03/26 15:37:18 OK   20230718112952_add_recipe_share.sql (1.18ms)
recipya  | 2025/03/26 15:37:18 OK   20230727140630_user_settings.sql (1.21ms)
recipya  | 2025/03/26 15:37:18 OK   20231008170402_cookbooks.sql (10.25ms)
recipya  | 2025/03/26 15:37:18 OK   20231204185640_delete_user.sql (661.41µs)
recipya  | 2025/03/26 15:37:18 OK   20240106173048_remove_websites.sql (555.33µs)
recipya  | 2025/03/26 15:37:18 OK   20240107135944_add_nutrition_serving.sql (1.95ms)
recipya  | 2025/03/26 15:37:18 OK   20240214134521_reports.sql (966.46µs)
recipya  | 2025/03/26 15:37:18 OK   20240220132005_recipes_fts.sql (659.96µs)
recipya  | 2025/03/26 15:37:18 OK   20240305113548_add_websites.sql (1.06ms)
recipya  | 2025/03/26 15:37:18 OK   20240309074329_add_app_table.sql (3.86ms)
recipya  | 2025/03/26 15:37:18 OK   20240322154137_refresh_scraper.sql (661.51µs)
recipya  | 2025/03/26 15:37:18 OK   20240430202115_add_additional_recipe_images.sql (847.71µs)
recipya  | 2025/03/26 15:37:18 OK   20240522133726_edit_recipe_update_fts.sql (1.24ms)
recipya  | 2025/03/26 15:37:18 OK   20240529172142_add_tools.sql (4.95ms)
recipya  | 2025/03/26 15:37:18 OK   20240601072708_add_advanced_search_tools.sql (6.89ms)
recipya  | 2025/03/26 15:37:18 OK   20240621134936_add_video.sql (808.48µs)
recipya  | 2025/03/26 15:37:18 OK   20240703053923_add_transfat.sql (3.61ms)
recipya  | 2025/03/26 15:37:18 OK   20240709092403_support_more_websites.sql (1.88ms)
recipya  | 2025/03/26 15:37:18 OK   20240710054825_refresh_scraper.sql (583.53µs)
recipya  | 2025/03/26 15:37:18 OK   20241219030306_refresh_scraper.sql (595.1µs)
recipya  | 2025/03/26 15:37:18 OK   20241222035239_improve_logs.sql (5.36ms)
recipya  | 2025/03/26 15:37:18 goose: successfully migrated database to version: 20241222035239
recipya  | Serving HTTP server at address http://0.0.0.0:8078

pihomeserver avatar Mar 26 '25 15:03 pihomeserver

Are you attempting to restore a global or user backup?

If it's a global, try opening the database with db browser for sqlite to see if there are any entries in the recipes table.

reaper47 avatar Mar 27 '25 00:03 reaper47