Dieser Abschnitt ist leider noch nicht auf Deutsch verfügbar. Wir entschuldigen uns für die Unannehmlichkeiten.
restore-model
$ littlesnitch restore-model --help
usage: littlesnitch restore-model [-hl] [-m backupUID > localUID, ...] [-p
<password>] [<input file>]
-h, --help
Print a short help and exit.
-l, --list-users
Do not actually restore, just list users contained in the file.
-m, --map-users backupUID > localUID, ...
Provide a mapping between backup and local user-IDs.
-p, --password <password>
Optional. When importing a configuration.xpl file from a different
computer, the "Little Snitch Encryption Key" from the system keychain
may be required.
This command imports backups and configuration database files from various versions of Little Snitch. You can use it to import backups in JSON format, backups from Little Snitch 3, 4 and 5 as well as current configurations from other instances of Little Snitch 3, 4, 5 or 6.
Backups and configuration databases usually contain settings for all users on the computer. Users are identified by their Unix User Identifier, a small integer number. When you import data from a different computer, users may have different identifiers and you may want to tell Little Snitch which user on the old computer corresponds to which user on the new computer.
If you import data from a different computer, first list the users in the archive:
$ sudo littlesnitch restore-model --list-users ~/LittleSnitch-2019-10-15.xpl
uid: short name full name
----------------------------------------------------------------------
0: root System Administrator (86 rules)
248: _mbsetupuser - (7 rules)
501: user1 First User (403 rules)
502: user2 Second User (55 rules)
User names help you with the mapping. If no user names are available, you can probably distinguish users by the number of rules. User 248 in the example above never really used Little Snitch. And you can see that user 501 was primarily active while 502 probably was a test account.
If you want to import a backup as-is, just use (with the example backup file from above):
sudo littlesnitch restore-model ~/LittleSnitch-2019-10-15.xpl
However, if you have a different User ID on the new computer, you need to set a mapping:
$ id -u
502
$ sudo littlesnitch restore-model --map-users "0 > 0, 501 > 502" ~/LittleSnitch-2019-10-15.xpl
Rules and settings from users which are not mapped are discarded.
If you need to perform any automated changes in the data model, you can export a JSON model with export-model
, modify the resulting JSON code in whatever way you like and re-import it with restore-model
.
Note that restoring a backup disables command line access if it was disabled at the time the backup was made!
War dieser Eintrag hilfreich? Hinterlass uns Feedback.
© 2016-2024 Objective Development Software GmbH