Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup second pass #6388

Merged
merged 10 commits into from Aug 25, 2023
Merged

backup second pass #6388

merged 10 commits into from Aug 25, 2023

Conversation

jackkav
Copy link
Contributor

@jackkav jackkav commented Aug 24, 2023

changelog(Improvements): Provide local data backup for all platforms after app start.

motivation: provide data backup for all platforms, after app start to version folder
goal: check remote for new version shortly after app start, if found, start backup process if not already done.

  • moves backup to app start rather than pre-upgrade in order to support all platforms
  • will not overwrite backup if files already exist in version backup folder
  • assumes if a mac release exists that windows and linux releases also exist
  • can be locally tested by deploying a new release or manually altering the version to something older that 2023.5.6 in the following line, or using the dev console below. If successful backup will appear in ~/Library/Application Support/insomnia-app/backups
path: `/builds/check/mac?v=${version}&app=${appConfig.appId}&channel=${settings.updateChannel}`,

also testable in dev console with

window.main.backup()
window.main.restoreBackup('2023.5.7') [where version number is a preexisting db backup]

@jackkav jackkav changed the title backup pass 2 backup second pass Aug 24, 2023
Copy link
Member

@filfreire filfreire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, checked on mac and windows

EDIT: @jackkav restore seems to restore everything back to how it was - but it would close the app right away when running and I had to restart the App by hand, not sure if that is by design

imagem

@jackkav
Copy link
Contributor Author

jackkav commented Aug 25, 2023

LGTM, checked on mac and windows

EDIT: @jackkav restore seems to restore everything back to how it was - but it would close the app right away when running and I had to restart the App by hand, not sure if that is by design

I don't understand your meaning can you clarity please

@filfreire
Copy link
Member

filfreire commented Aug 25, 2023

@jackkav when I called the restore backup via dev tools - the app would close and not start again

@gatzjames gatzjames enabled auto-merge (squash) August 25, 2023 15:20
@gatzjames gatzjames merged commit 7e3e44c into Kong:develop Aug 25, 2023
7 checks passed
jackkav added a commit to jackkav/insomnia that referenced this pull request Nov 24, 2023
* some notes on approach

* some broken fs logic

* some more broke stuff

* fix backup logic

* rename export to backup

* wire up a restore

* restore check

* only update if newer version

* extract to function

* rename export to backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants