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

Fix backup cli #345

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Fix backup cli #345

wants to merge 11 commits into from

Conversation

n8marti
Copy link
Collaborator

@n8marti n8marti commented Feb 26, 2025

Get backup and restore working for CLI (prep for getting general backup/restore working)

  • Split backup/restore into own module and Include unittests
  • Ensure backup works to fixed and removable drives (snap pkg needs additional permission from user for removable drives)
  • Ensure restore works on clean Logos install
  • Ensure restore works on existing Logos install (i.e. overwriting existing data)
  • Re-publish CLI backup/restore options

@n8marti
Copy link
Collaborator Author

n8marti commented Feb 26, 2025

We might need/want to backup/restore Logos registry keys, as well as user data folders.

Copy link
Contributor

@ctrlaltf24 ctrlaltf24 left a comment

Choose a reason for hiding this comment

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

Nothing new, some thoughts feel free to ignore, I know you're still working

bar += str(d*d_ct)
bar += suffix #+ end
return bar

# De-dup
if message != self._last_status:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the bar print even if the status didn't change?

We may consider changing the Downloading.... status to use a percentage instead of adding dots

from pathlib import Path

from ou_dedetai.app import App

from . import system
from . import utils
# from . import utils
Copy link
Contributor

Choose a reason for hiding this comment

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

?

while t.is_alive():
i += 1
i = i % 20
app.status(f"{message}{"." * i}\r")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use progress in status rather than adding dots

if mode == 'restore':
if not app.conf.logos_exe:
app.exit("Cannot restore, Logos is not installed")
dst_dir = Path(app.conf.logos_exe).parent
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this use logos app data Dir instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had the same question, but I think the Logos app should be installed before trying to restore a backup. Otherwise installing Logos over existing data directories might clobber them? Not sure. Also, is app.conf.logos_exe generic enough to be defined as the Verbum exe path as well?

@n8marti
Copy link
Collaborator Author

n8marti commented Feb 26, 2025

Consider a file chooser for setting Backup dir:
The TUI one is a text field with mkdir. tui_app.py:L774

@n8marti n8marti marked this pull request as ready for review February 26, 2025 16:19
@n8marti n8marti requested review from ctrlaltf24 and thw26 February 26, 2025 16:19
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.

2 participants