Executable programs and extensions

How to Back Up and Restore a Local LLM You Already Use

Copy a working model to another drive, then get a test response from the copy while keeping the original intact.

A local LLM1 backup2 keeps your working model folder, version, and runtime3 settings on another drive. To restore it, register the backup files in your app and test your usual task. Start by copying the complete folder, then follow a restore example that imports one text-only GGUF4 into LM Studio and summarizes a notice.

Requirements and key details
  • Record the model repository ID, fixed commit ID, original file names, and format.
  • A GGUF may be one file, but a split model needs every shard; MLX and safetensors models should be backed up with their related files.
  • Keep the original folder and test a copy at another path so you can continue using the model you know if the test fails.

Choose your everyday model and a test document first

Start with one model you regularly use for document summaries. Before copying it, enter ‘Service will be unavailable for 10 minutes next Tuesday at 3 p.m. for maintenance,’ and ask, ‘Summarize the schedule and expected impact in one sentence.’ Keep both the notice and prompt5 so you can repeat the test after loading the copy. Leave your original model folder in place until the restore test is complete.

To retrieve the same files, record the fixed commit rather than the repository's main branch or a movable tag. Redownloading from a private or gated repository requires an authorized account and access. Restore model files you already have locally; check the license terms before sharing or distributing the model.

A workspace with black protective cases holding equipment and papers on either side of a metal pass-through cabinet
Keeping the model and its run record together makes the setup easier to identify on another drive.

Check what to keep based on the model format

First, find the folder the app actually loads in its model manager. Remembering only the model name can lead you to download a similarly named quantization6 or a newer revision. Record the repository owner and ID, exact commit revision, original file names, format and quantization, app and runtime versions, and any settings you changed, such as the chat template or context length7.

A GGUF file contains weights and metadata describing the model, and some models run from a single file. Check the model card and runtime's file requirements. If the model is split across multiple files, keep every shard together in one folder. Models that handle images or audio may need a separate projector file, so follow the file names and layout specified in the model card.

MLX8 and safetensors models can use configuration, tokenizer, index, and shard files to load their weights. Copy the full repository folder your app currently reads and include the files named in the model card. Keep a copy of the model card and license in the folder so you can identify the repository and its terms later.

Backup record fields and why they matter
RecordWhy keep it
Repository ID and commit revisionTo identify the same model file revision
Format, quantization, and original file namesTo check runtime compatibility and all required shards
Companion files and licenseTo restore configuration and usage terms together
App and runtime versions and adjusted settingsTo reproduce the conditions used to load the model

Copy the whole model folder and compare its files

Open the model folder you identified in the app using File Explorer or Finder, then copy the entire folder to your backup drive. Keep any weight shards, configuration files, and tokenizer files together inside it. Once copying finishes, compare file lists and sizes with the original and keep your recorded versions and settings, model card, and license with the backup. Leave the original folder intact until the restore test is complete.

Pay attention9 to symbolic links when copying a folder from the default Hub cache. If entries in snapshots link to data in blobs, either follow those links to copy the actual files or preserve the links and copy both snapshots and blobs. Moving only a snapshot can break links that pointed to the original computer's cache.

Compare the copy's file list and sizes with the original, then use a SHA-256 checksum to check whether important large files have identical bytes. On macOS, open Terminal and replace the two paths below with the actual paths to the source and copied GGUF files. If the checksum strings before the file names match, the files at those paths have identical contents.

Compare the source and copied GGUF checksums on macOS
shasum -a 256 "$HOME/Models/Publisher/Model/model.gguf" "/Volumes/Model-Backup/Publisher/Model/model.gguf"
Replace both paths with the actual file locations. Matching checksum strings before the file names mean the copy has the same bytes as the source.

Import a GGUF backup into a separate LM Studio folder and run it

Open the LM Studio app once, then run lms --help in a terminal and check that the command list appears. If it is not found, follow the CLI setup guide. The command below imports one copied text-only GGUF into a test model folder named backup-check/restored-model. --copy also leaves the imported source file intact, and --user-repo selects a folder separate from your everyday model. If that test folder is already in use, choose a new name rather than overwrite existing files.

Import the copied GGUF into LM Studio while preserving the source
lms import "/Volumes/Model-Backup/Publisher/Model/model.gguf" --copy --user-repo "backup-check/restored-model"
lms ls
Check the copied file path and unused test-folder name before importing.

After importing, select the test model under backup-check/restored-model in lms ls or the app's My Models screen. The test uses this model imported from your backup drive. Match the recorded app and runtime versions and settings, then send the opening notice and summary prompt again. Check that the answer includes Tuesday at 3 p.m. and the ten-minute interruption.

To check offline use, disconnect the network once the model and runtime are ready and repeat the same summary. LM Studio can chat with downloaded LLMs and run a local server offline. Model search, new file and runtime downloads, and update checks require a connection.

If the result differs from your usual one, compare the model path, any missing shards, the loaded model ID, template, and context settings with your record. A load error can point to runtime compatibility or missing companion files; a response difference can follow from changed settings or runtime versions. Check where the process diverged before downloading files again so you can distinguish a difference in the original from one in the copy.

A desk with an external drive and compact PC; the monitor shows a storage icon and progress bar
Loading the copy from its new location shows whether it can actually be restored.

Use a fixed commit when downloading files again

When downloading a model from Hugging Face, copy the full fixed commit ID from the repository's commit history. Pass it to hf download with --revision to select the same version; add --dry-run first to see the file list and total size before downloading. Add --local-dir when you want the full repository saved as regular files in a folder you choose. Downloading a gated model requires authentication and access approval for that account.

If you already backed up the model folder, restore from those files. For a fresh download, --local-dir saves regular files in the repository structure under the folder you choose. After downloading, follow the earlier copying, file comparison, and restore test steps to check your backup.

A model backup and a full app backup cover different things

The restore command in this guide is for a single text-only GGUF used with LM Studio. For MLX or safetensors, back up the folder and companion files as described earlier, then follow your original app's model registration procedure. Register the copy in the folder structure that app requires and test it with the recorded settings and the same summary prompt.

For a personal model backup, record the model files and the app and runtime versions and settings used to load them. If the new computer must start without an internet connection, prepare the operating system, app installer, and required runtime separately. First test the copy with the app and runtime you normally use; if you change versions, run the representative document summary again and check for differences.

When one person is moving one model, keep the model folder used by the current app and its settings record. For deployment across multiple devices or bringing a validated installation bundle into a secure zone, see the organizational process in the offline and air-gapped local AI deployment guide. Personal recovery is complete when you repeat your usual summary with the copy while keeping the original.

To connect the restored model to your usual app, continue with the local profile and server address settings in the OpenRouter-to-local LLM guide.

Two metal devices sit on a desk and shelf beside a laptop, with cables connected to a switch box in front
Leave the original model folder in place until the restore test is complete.

Terminology notes

  1. Large language model — A model trained on large text datasets to learn language patterns and process or generate text in context.

    Back to the text
  2. Backup — Saving settings and data to a file so the same setup can be returned to after a hardware failure.

    Back to the text
  3. Runtime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.

    Back to the text
  4. GGUF — A file format for model data, widely used by llama.cpp-based tools.

    Back to the text
  5. Prompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.

    Back to the text
  6. Quantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.

    Back to the text
  7. Context window — The token span of input and generated content a model can handle in one request. The supported limit and memory use depend on the model and runtime settings.

    Back to the text
  8. MLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.

    Back to the text
  9. Attention — A neural-network operation that calculates relationships between input tokens and combines information from each position into the current representation.

    Back to the text

Frequently asked questions

What should you check first in this article?
A local LLM backup keeps your working model folder, version, and runtime settings on another drive. To restore it, register the backup files in your app and test your usual task. Start by copying the complete folder, then follow a restore example that imports one text-only GGUF into LM Studio and summarizes a notice.
Where can you check the conditions and sources?
To retrieve the same files, record the fixed commit rather than the repository's `main` branch or a movable tag. Redownloading from a private or gated repository requires an authorized account and access. Restore model files you already have locally; check the license terms before sharing or distributing the model.