pieces-app / opensource

Main repo for tracking open source projects, issues, conversations, and links to each open source project.
MIT License
168 stars 20 forks source link

Backup Function #26

Closed hra42 closed 7 months ago

hra42 commented 9 months ago

I noticed that pieces created a backup at com.pieces.os\production\Backups.

I think these backups are helpful if the backup contained logs for the devs to be able to restore and check the logs for errors. Also, it would be helpful to have the backup function as an API endpoint, so we could trigger it when we need it. The workflow would be:

  1. Stop the currently running pieces os / desktop instances
  2. create the backup
  3. start pieces os

Do we need a backup of com.pieces.pfd\production too?

I think the API would need to trigger a platform-specific script, so we can use os native tools.

jwafu commented 8 months ago

@HRA42 we should be able to just pull backups out of there and use that as the core for restoring from a backup - this should avoid some of the heavier files that are included when in comes to downloading local models.

This could be interesting and would love to see and implementation of this - we could add this in to the example repo and test it first, then get it added into the SDK itself for everyone to use.

would also add a step to have the file be created, and then have the backup be added to downloads so its easy to find, or the desktop - some specific location that is not nested so deeply in the com.pieces.os directory. that way there is a copy of a DB created to use if needed without potentially damaging the original DB.

just some thoughts here - and yes we can make it platform specific since the file location for each of the OS's dbs is different.

hra42 commented 8 months ago

would also add a step to have the file be created, and then have the backup be added to downloads so its easy to find, or the desktop - some specific location that is not nested so deeply in the com.pieces.os directory. that way there is a copy of a DB created to use if needed without potentially damaging the original DB.

we could add a parameter to the scripts so the user could override a default location if they want to store it somewhere else (NTFS shares for example)

jwafu commented 8 months ago

@mark-at-pieces can you comment on this and just ensure that we are talking about this properly ? i want to ensure that we are first testing this in an environment that is not going to break anything for others - and not going to impact anything in the larger plan here - let me know if we need to link on this but wanted to bring you in here. 👍

jwafu commented 8 months ago

i know we have heard back from mark here - but i am curious how your work/thoughts around this project are going? @HRA42

hra42 commented 8 months ago

Hi @jordan-pieces,

sorry I don't have the time currently. I needed to develop something for work that had a very high priority. I hope to get back to this in the next few days.

jwafu commented 8 months ago

all good just wanted to checkin - no rush at all 👍 will be sure to dedicate some more time to looking the issue around this

mason-at-pieces commented 7 months ago

Just a quick update on this, we will be releasing a backup/restore ability that is built into Pieces Desktop App very soon. This project can still continue as we are not currently releasing a "sync" option but is more of a easy way to backup your data and restore it on another device.

hra42 commented 7 months ago

Hey @mason-at-pieces,

thanks for the heads up. Could you make sure that we can trigger the backup function via cli? That would help!

mason-at-pieces commented 7 months ago

@HRA42 Absolutely no problem. As far as a way to trigger the backup, let me check. I want to say yes it will be available through the SDK, making it available to add to the CLI but I need to double-check with our eng team.

Will have a reply tomorrow 👍

mason-at-pieces commented 7 months ago

@HRA42 I confirmed that this will be available through our SDK so we will just need to get the feature built in our cli and it will be all good to go 👍

hra42 commented 7 months ago

Thank you @mason-at-pieces. 👍🏻

mason-at-pieces commented 7 months ago

Absolutely @HRA42, and expect updates to our documentation and support around our SDK in the next month which will make it very easy to build using Pieces SDK 👍

mason-at-pieces commented 7 months ago

@HRA42 You can follow the SDK docs progress here: https://github.com/pieces-app/documentation/issues/282

I'm not sure if we will have docs released for Backup functionality released by the end of this month, but we will have the basic endpoints released.