refi-app icon indicating copy to clipboard operation
refi-app copied to clipboard

Export collections, documents, sub collections

Open loic-hamdi opened this issue 2 years ago • 10 comments

Is it possible to export all collections, documents, sub collections at once? (basically a backup of the database)

I tried on Mac M1 0.0.19 but the JSON export only save the current document.

loic-hamdi avatar Oct 04 '22 01:10 loic-hamdi

Screen Shot 2022-10-05 at 09 47 08

@thanhlmm Hi Thanh, With the current app behavior, when I export production I only have the v1_0_0 document. I would like to include in the export all the sub-collections and sub-documents like circles and their documents 440ccc70-d62b-11ec-bffc-2d592f6937fb and cb991d40-3fa0-11ed-bf9f-cf32d17fe588

How can I please do that?

loic-hamdi avatar Oct 05 '22 14:10 loic-hamdi

It is not possible now. You need to use some other npm CLI to do that I think. I have used it before and it works quite well

Try this https://www.npmjs.com/package/firestore-export-import

thanhlmm avatar Oct 05 '22 14:10 thanhlmm

It is not possible now. You need to use some other npm CLI to do that I think. I have used it before and it works quite well

Try this https://www.npmjs.com/package/firestore-export-import

Thank you for sharing the link & your reactivity.

Are you planning to include this feature in refi-app? That would be a such an important and awesome thing to add!

loic-hamdi avatar Oct 05 '22 15:10 loic-hamdi

I want to, but I'm quite busy making money to survive 🤣

thanhlmm avatar Oct 05 '22 15:10 thanhlmm

ahaha 🤣 don't give up!! 💪💰

loic-hamdi avatar Oct 05 '22 15:10 loic-hamdi

haha thanks! I gonna update Refi when I have time

I'm happy that you can use it :)

thanhlmm avatar Oct 05 '22 15:10 thanhlmm

Thank you! 😄

Here is an idea that would make refi-app an outstanding successful app: 🔥 Automated scheduled backup 🔥

loic-hamdi avatar Oct 05 '22 16:10 loic-hamdi

haha crazy idea, but for now refi app is a desktop and it can not run day by day to do the scheduled backup. Do you think we have other way?

thanhlmm avatar Oct 05 '22 16:10 thanhlmm

As it is a desktop app, maybe it is possible to:

  • tell user to keep refi-app always open
  • minimize it in tray
  • choose a backup frequency (for example every 48h or at 12:00pm every day)
  • export selected collections (and all sub-collections 😜 / sub-documents ) as JSON
  • save backup on local disk with a name based on export date like production_2022_10_05_at_11_40_am.JSON

It is not the best of the best but it seems to be something helpful, realistic and doable without a crazy amount of work 🤔

What do you think?

loic-hamdi avatar Oct 05 '22 16:10 loic-hamdi

If you add Automated scheduled backup as a premium feature i would 100% pay for it.

andersdn11 avatar Nov 22 '22 12:11 andersdn11