-
Notifications
You must be signed in to change notification settings - Fork 282
Add backup / restore admin commands #747
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
4bf61d4
3008e03
336e515
fb48fc2
2d88d8e
ec13bd3
5ee0264
7422d9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -462,6 +462,21 @@ def onConnected(interface): | |||||
| waitForAckNak = True | ||||||
| interface.getNode(args.dest, False, **getNode_kwargs).removeFavorite(args.remove_favorite_node) | ||||||
|
|
||||||
| if args.backup_prefs: | ||||||
| closeNow = True | ||||||
| waitForAckNak = True | ||||||
| interface.getNode(args.dest, False, **getNode_kwargs).re(args.backup_preferences) | ||||||
|
|
||||||
| if args.restore_prefs: | ||||||
| closeNow = True | ||||||
| waitForAckNak = True | ||||||
| interface.getNode(args.dest, False, **getNode_kwargs).re(args.backup_preferences) | ||||||
|
|
||||||
| if args.remove_backup_prefs: | ||||||
| closeNow = True | ||||||
| waitForAckNak = True | ||||||
| interface.getNode(args.dest, False, **getNode_kwargs).re(args.remove_backup_preferences) | ||||||
|
|
||||||
| if args.set_ignored_node: | ||||||
| closeNow = True | ||||||
| waitForAckNak = True | ||||||
|
|
@@ -1794,12 +1809,40 @@ def addRemoteAdminArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentPars | |||||
| action="store_true", | ||||||
| ) | ||||||
|
|
||||||
| group.add_argument( | ||||||
| "--backup-prefs", | ||||||
| help="Tell the destination node to create a backup preferences file." | ||||||
| "Location: 0 for local flash, 1 for SD card.", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be nice if we allow people to pass I think this could be done by adding a helper function and passing it as def backup_location(string):
try:
return int(string)
except ValueError:
return admin_pb2.AdminMessage.BackupLocation.__getattr__(string)I'm a bit tired so hopefully I'm relaying this properly, heh. |
||||||
| default=None, | ||||||
| nargs="?", | ||||||
| const=0, | ||||||
| ) | ||||||
|
|
||||||
| group.add_argument( | ||||||
| "--restore-prefs", | ||||||
| help="Tell the destination node to remove backup preferences files." | ||||||
|
||||||
| help="Tell the destination node to remove backup preferences files." | |
| help="Tell the destination node to restore preferences from a backup." |
Copilot uses AI. Check for mistakes.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [tool.poetry] | ||
| name = "meshtastic" | ||
| version = "2.5.12" | ||
| version = "2.6.0" | ||
thebentern marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| description = "Python API & client shell for talking to Meshtastic devices" | ||
| authors = ["Meshtastic Developers <[email protected]>"] | ||
| license = "GPL-3.0-only" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.