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/restore specific applications #2034

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

lamelas
Copy link

@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

# 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

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

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

@@ -179,8 +197,8 @@ def printAppHeader(app_name):

elif args["show"]:
mckp.check_for_usable_environment()
app_name = args["<application>"]

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

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?

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