Backup & restore¶
KorTTY creates encrypted backups of all your settings, connections, credentials, and SSH keys. Use backup and restore to protect your configuration or move it between machines.
Features¶
- Encrypted backups — All backups are encrypted using either password-protected ZIP or GPG encryption
- Configuration backup — Includes connections, credentials, SSH/GPG keys, trusted interactive SSH host keys, global settings, JobScheduler configuration, snippets, AI chat history, local-model registrations, and knowledge-store source metadata
- Regenerable local AI data excluded — GGUF weights, native llama.cpp runtimes, signed-catalog cache, temporary sidecar files, and HNSW snapshots are intentionally not copied into the archive
- Projects directory — All saved project workspaces are included in the backup
- Automatic rotation — Old backups are automatically moved to an
old-backupssubdirectory with timestamps - Configurable retention — Set a maximum number of backups to keep (0 = unlimited; oldest backups are deleted automatically)
- Import/restore — Restore from previously created backups with optional overwrite control
- Flexible decryption — Both password-encrypted ZIP and GPG-encrypted formats are supported for import
Creating a backup¶
- Open Edit → Create Backup... or press Ctrl+Shift+B (Cmd+Shift+B on macOS)
- Select a destination directory for the backup file
- The backup is created using the encryption method configured in Settings → Backup
KorTTY names the current backup kortty-backup.zip in the target directory. If a backup already exists there, it is automatically rotated into an old-backups subdirectory with a timestamp appended (e.g., kortty-backup_2025-06-24_14-30-45.zip).
The backup includes:
| Item | Details |
|---|---|
| Connections | All saved SSH connections and groups |
| Credentials | Stored usernames and passwords (encrypted) |
| SSH keys | Key references with encrypted passphrases, plus the copied key files in ~/.kortty/ssh-keys/ |
| Trusted interactive hosts | ssh-host-keys.properties, shared by Terminal, SFTP, and the Mosh SSH bootstrap; the transient .lock companion is not included |
| GPG keys | GPG public keys for backup encryption |
| Settings | Global application settings, terminal configurations, themes, and AI profiles |
| JobScheduler jobs | All scheduled jobs, host-key pins, and encrypted sudo passwords |
| Snippets | Code snippets and script templates with metadata |
| Snippet variables | Custom variables for snippet substitution |
| AI chats | Saved AI conversation histories and profiles |
| Local AI configuration | Local GGUF registrations and typed launch settings, Text/Coding roles, preferred runtime backend/update policy, and encrypted Hugging Face token |
| Knowledge-store configuration | Store metadata and source paths, filters, sync modes, and embedding configuration; not the HNSW vectors |
| Projects | All .kortty project workspace files |
Backup encryption¶
Password-protected ZIP (default)¶
- Open Settings → Backup
- Select Encryption Type: Password
- Choose or create a credential to use as the encryption password
- Optionally set Maximum Backups (0 = unlimited)
- Save
Password-protected backups are encrypted with AES-256 (via the zip4j library); the credential's password encrypts all files in the archive. Backups created by older korTTY versions used legacy ZIP encryption and can still be imported — the decryption method is read from the archive itself. Note that AES-encrypted ZIPs need an AES-capable tool (7-Zip, WinZip, unzip 6+) if you ever extract one outside korTTY.
GPG encryption¶
- Open Settings → Backup
- Select Encryption Type: GPG
- Choose a GPG key from Manage GPG Keys...
- Optionally set Maximum Backups (0 = unlimited)
- Save
GPG backups encrypt the backup file using the public key of your selected GPG key. KorTTY creates a temporary ZIP first, then encrypts it with gpg --encrypt and stores the .gpg file. The temporary ZIP is securely deleted after encryption.
Tip
If you don't have GPG keys set up yet, use Management → Manage GPG Keys... to import keys from your system keyring or add them manually.
Importing a backup¶
- Open Edit → Import Backup...
- Select a backup file (
.zipor.gpg) - If the backup is password-protected, enter the password when prompted
- Choose whether to Overwrite Existing Files:
- Checked — Backup files will replace any existing files in your configuration
- Unchecked — Existing files are skipped; only missing files are imported
- Click Import
- Restart the application for all changes to take effect
Warning
Importing a backup with Overwrite enabled will replace your current settings, connections, and credentials. If you are unsure, uncheck this option to merge the backup without overwriting.
Backup file contents¶
Both .zip and .gpg backups contain the same files:
connections.xml— All SSH connections and groupscredentials.xml— Stored credentials (still encrypted with your master password)ssh-keys.xml— SSH key references and encrypted passphrasesssh-keys/— Copied SSH key files (only keys you placed there via Copy to User Directory; keys referenced in their original locations are not collected). Restored key files get owner-only permissions, and an import merges — it never deletes or, without Overwrite, replaces keys already presentssh-host-keys.properties— Trusted public host keys for interactive Terminal, SFTP, and Mosh bootstrap connections (ssh-host-keys.properties.lockis intentionally excluded)gpg-keys.xml— GPG public keysglobal-settings.xml— Application settings, themes, AI profiles, terminal defaultsjob-scheduler.xml— JobScheduler jobs, host-key pins, encrypted sudo passwordssnippets.xml— Code snippets and templatessnippet-variables.xml— Custom snippet variablesai-chats.xml— Saved AI conversationsmaster.key— Hash of your master password (for verification on import)llm/models.xml— Local GGUF registrations and runtime settings (model weights are not included)rag/stores.json— Knowledge-store and source configuration (vector snapshots are not included)projects/— All saved project workspace files (.kortty)
Note
All passwords and credentials inside the backup remain encrypted with your master password. When you import a backup, you must unlock the master password for KorTTY to decrypt the credentials.
Rebuild local AI assets after a restore
The backup excludes llm/models/, llm/runtime/, llm/catalog/, llm/run/, and local index.hnsw snapshots. After moving to another computer, restore or download the GGUF files and a compatible runtime, reconnect any external model/source paths, then run Update now in each knowledge store to regenerate its index. The signed catalog cache refreshes automatically or falls back to the bootstrap. Original source documents and external Qdrant data are not part of a korTTY configuration backup.
Backup retention and cleanup¶
When you create a new backup in a directory that already contains one, KorTTY:
- Creates the new backup as
kortty-backup.zip - Moves the existing backup to
old-backups/kortty-backup_<timestamp>.zip - If the number of old backups exceeds Maximum Backups, deletes the oldest ones
To keep unlimited old backups, set Maximum Backups to 0 in Settings → Backup. To keep only the current backup, set Maximum Backups to 1 (old backups are still rotated but then immediately deleted).
Using backups across machines¶
- Export your current configuration:
-
On machine A, open Edit → Create Backup... and save to a USB drive or cloud storage
-
Move the backup file:
-
Copy
kortty-backup.zip(or.gpg) to machine B -
Import on the new machine:
- On machine B, open Edit → Import Backup...
- Select the backup file from step 2
- Enter the backup password if prompted
- Leave Overwrite unchecked unless you want to replace existing connections
- Restart KorTTY
All backed-up connections, settings, snippets, saved chats, interactive host-key trust decisions, model registrations, and knowledge-source definitions will be available on machine B. Restored host keys are still matched by normalized host name and port, so a changed key remains blocked after migration. Local model weights, runtime packages, source documents, and HNSW vectors must be restored or regenerated separately.
Troubleshooting¶
- "Backup file not found"
- Verify the file path is correct and the file exists. Check the directory permissions.
- "Password required for password-encrypted backup"
- Password-protected backups need the correct password. Verify you are entering the credential password (from Settings → Backup), not your master password.
- "GPG key not found"
- The GPG key used for encryption is missing. Use Management → Manage GPG Keys... to import or add the key, then try again.
- "No password selected for backup encryption" or "No GPG key selected"
- Configure a password credential or GPG key in Settings → Backup before creating a backup.
- Import succeeded but changes did not take effect
- Restart KorTTY for imported settings to become active. If you imported credentials, you may also need to unlock the master password after restart.
- Backup file is larger than expected
- Large backups can occur if you have many saved AI chats or a large projects directory. GGUF weights, llama.cpp runtime packages, and HNSW snapshots are excluded and cannot be the cause.