Skip to content

Backup/restore specific applications#2034

Open
lamelas wants to merge 3 commits into
lra:masterfrom
lamelas:master
Open

Backup/restore specific applications#2034
lamelas wants to merge 3 commits into
lra:masterfrom
lamelas:master

Conversation

@lamelas
Copy link
Copy Markdown

@lamelas lamelas commented Jul 2, 2024

This is a quick take at allowing backup/restore of specific applications. I found it useful for myself and found at least two people requesting it on #2019 and #1892. I'll try to add the option to do the same with the uninstall command in the future.

All submissions

Adding/updating Application X Support

  • This PR is only for one application
  • It has been added to the list of supported applications in the README
  • Changes have been added to the WIP section of the CHANGELOG
  • Syncing does not break the application
  • Syncing does not compete with any syncing functionality internal to the application
  • The configuration syncs the minimal set of data
  • No file specific to the local workstation is synced
  • No sensitive data is synced

Improving the Mackup codebase

  • My submission passes the tests
  • I have linted the code locally prior to submission
  • I have written new tests as applicable
  • I have added an explanation of what the changes do

@lamelas lamelas changed the title Backup/restore single application Backup/restore specific applications Jul 2, 2024
Comment thread mackup/main.py

# To allow for specific applications to be backed up, we replace the full list with only the valid ones from the command line
if args["<application>"]:
applications = list(set(args["<application>"]) & set(applications))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should it fail here if any explicit application is not recognized?
silent ignoring them seems dangerous, as it would imply everything went fine

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it should also be sorted again, to maintain the same behaviour

Comment thread mackup/main.py
mckp.check_for_usable_environment()
app_name = args["<application>"]

app_name = args["<application>"][0] # Needed because args["<application>"] is now a list
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why not support multiple applications also in show command?

kzaoaai added a commit to kzaoaai/mackup that referenced this pull request Apr 18, 2026
- Add validate_app_names() helper to check requested apps against database
- Fail with clear error message for invalid/unsupported app names (fixes lra#2034 review feedback)
- Extend show command to support multiple applications
- Add validation to all commands: backup, restore, link install, link uninstall, link
- Update docstrings to reflect multi-app support
- Maintains backward compatibility with single-app syntax
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