Skip to content

Conversation

@tlindi
Copy link
Contributor

@tlindi tlindi commented May 29, 2025

First sub-set of Data Management - App Data Reset

This will provide initial functions needed to create complete App Data (Storage) Management
Main PR is #940

Checklist

  • tested successfully on local MyNode, if yes, list the device(s) below
  • [_] mentioned related open issue, if any

List of test device(s)

VM MyNode 0.3.36

@tlindi
Copy link
Contributor Author

tlindi commented May 29, 2025

This reset functionality can be tested with latest Alby Hub Upgrade #946

@tlindi tlindi force-pushed the Implement-App-data_folder-reset branch 2 times, most recently from 504c402 to 57fac93 Compare June 13, 2025 12:01
tlindi added a commit to tlindi/mynode that referenced this pull request Jun 13, 2025
Implement simplification per requested at
mynodebtc#945 (comment)
@tlindi tlindi force-pushed the Implement-App-data_folder-reset branch from 57fac93 to 82fa1cc Compare June 13, 2025 13:30
tlindi added a commit to tlindi/mynode that referenced this pull request Jun 13, 2025
Implement simplification per requested at
mynodebtc#945 (comment)
@tlindi tlindi force-pushed the Implement-App-data_folder-reset branch from 82fa1cc to 21ab5a7 Compare June 13, 2025 13:34
@tlindi tlindi changed the title Implement App storage folder reset [API] Implement App storage folder reset Jun 13, 2025
@tlindi
Copy link
Contributor Author

tlindi commented Jun 13, 2025

Needs a bit more work cause now
"GET /api/reset_data_folder?app=albyhub HTTP/1.1" 200
returns
Error removing app data: NO_APP_SPECIFIED

@tlindi
Copy link
Contributor Author

tlindi commented Jun 13, 2025

Simplified API and works for me now.

@tehelsper review, please?

@tlindi
Copy link
Contributor Author

tlindi commented Jun 20, 2025

Above error (at #945 (comment)) needs to be fixed as adviced here:
#940 (comment)

@tlindi tlindi force-pushed the Implement-App-data_folder-reset branch from 7ff83a6 to 911f437 Compare June 28, 2025 19:37
@tehelsper tehelsper merged commit ac8d435 into mynodebtc:master Jul 6, 2025
@tlindi
Copy link
Contributor Author

tlindi commented Jul 7, 2025

Oh, you implemented whole backup/restore straigt forward way.

I had idea to include versioning info to backup filee name.

@tehelsper
Copy link
Collaborator

I didn't implement all of it - the functionality was hidden by hiding the buttons, which I was fine with. I missed the app name part hadn't been standardized. Can you combine this into one PR?

@tehelsper
Copy link
Collaborator

tehelsper commented Jul 8, 2025

I'm going to revert the change.

tehelsper added a commit that referenced this pull request Jul 8, 2025
@tehelsper
Copy link
Collaborator

OK, I'm working on getting the reset functionality back in with a fix. My plan is to fix the naming variables and then work on testing AlbyHub with the config to automate the setup. Have you been working on any of that?

@tehelsper
Copy link
Collaborator

tehelsper commented Jul 13, 2025

Can you take a look at this? It should be the reset functionality with the name fixes. Let me know if you see any issues.

c0f0a66

Edit - the backup/restore functions exist, but are unimplemented. We can consider options for how to implement in a future PR.

@tlindi
Copy link
Contributor Author

tlindi commented Jul 13, 2025

OK, I'm working on getting the reset functionality back in with a fix.
My plan is to fix the naming variables and

Seems we made bit dublicate work :-/

I had this done yesterday: 2910238

then work on testing AlbyHub with the config to automate the setup.
Have you been working on any of that?

I have not started anything with automatization.

@tlindi
Copy link
Contributor Author

tlindi commented Jul 13, 2025

Can you take a look at this? It should be the reset functionality with the name fixes. Let me know if you see any issues.

c0f0a66

I'll rebase #940 and test.

Edit - the backup/restore functions exist, but are unimplemented.

I have not idea how tar.gz Download could be done - but I like idea very much. I would enable advanced users to take data and so help all kind of situations. I feel fine if you implement tar.gz backup. I wouldn't even need restore - I could do it manually. But such thing would be great if included in MyNode.

We can consider options for how to implement in a future PR.

Could it be #940 ?

tlindi added a commit to tlindi/mynode that referenced this pull request Jul 13, 2025
Implement simplification per requested at
mynodebtc#945 (comment)
@tlindi
Copy link
Contributor Author

tlindi commented Jul 13, 2025

Reset works for me on "master" as intended after this
#945 (comment)

@tehelsper
Copy link
Collaborator

It looks like #940 basically the same as what was here. Am I missing something? The only diff I see is from a few naming things I modified.

The download part should be easy. Re-upload would be harder, but as long as the download part works, it would still be a good step in the right direction, because it would allow for backup and manual re-import. Getting the permissions right on the upload is challenging - some apps seem to handle things differently. Changing all permissions to the app user may work, but I think some apps end up with root permissions if they use docker. I'll have to check later.

@tlindi
Copy link
Contributor Author

tlindi commented Jul 14, 2025

It looks like #940 basically the same as what was here. Am I missing something? The only diff I see is from a few naming things I modified.

Yes, it was quite the same. I found nothing missing on my rebase.
And also I believe your fixes were more accurate than mine ;-)

The download part should be easy.

I think so too. I'm not quite familiar with file handling / tarrring functions of MyNode APIs. So I would have needed to study quite much to use them correctly. (like tmp folder usage and moving / renaming file etc)

Re-upload would be harder, but as long as the download part works, it would still be a good step in the right direction, because it would allow for backup and manual re-import.

That would be something I believe no many bundle node offers either. But I know it's a hard to do, as I did it for my own version of phoenixd App.

Getting the permissions right on the upload is challenging - some apps seem to handle things differently.

likely more harder than untarring local.

Changing all permissions to the app user may work, but I think some apps end up with root permissions if they use docker.

Yes, they do - therefore I even made "hack" that service starting uses + to chmod files of from root for backup or something (I quite don't remember wwhat) but root files by dockers are nasty.

I'll have to check later.

No worries - download tar.gz and "free style" scp or so upload and unzipping works for me. More nicer if some other people vote / ask for the feature XD

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.

3 participants