Backing Up Your Self-Hosted AI Setup: Step by Step
Self-hosted AI models can take hours to download again if lost. This walkthrough shows where Ollama actually stores its files on Linux, Mac and Windows, and how to back up what genuinely matters.
Reading is great. Tracking makes it stick. Sign up for a free Dashboard to tick off tasks and see your Security Score.
Get my free Dashboard →
Cyber Nova AI helps you prepare for Cyber Essentials. It doesn't award or certify it. Follow the steps here to get ready, then apply for certification through an accredited Cyber Essentials body when you're set.
What you will need
- Ollama installed and at least one model downloaded
- An external drive or backup location you already use for other files
- About 10 minutes
Find where your models are stored
The location differs by operating system. On Linux:
/usr/share/ollama/.ollama/modelsNote: On Mac, this is ~/.ollama/models. On Windows, it is C:\Users\%username%\.ollama\models.
Check how much space it uses
Models can be several gigabytes each. On Linux or Mac, check the size with:
du -sh ~/.ollama/modelsNote: Adjust the path for your operating system. This tells you how much backup space you will need.
Copy the models folder to your backup location
Copy the whole models folder to an external drive or your existing backup destination, the same way you would back up any other important folder.
Note: Re-downloading models is usually easier than restoring a backup, since Ollama can fetch them again from scratch. The more valuable things to back up are any custom configurations or fine-tuned models you have created yourself.
Back up any custom setup separately
If you have customised Ollama (a systemd service file, environment variables, a reverse proxy configuration), note these down or copy the relevant config files too.
What you will have at the end
A backup of your self-hosted AI setup, so a drive failure or a fresh install does not mean starting from nothing.
Why this is worth doing, even though models can be re-downloaded
Standard AI models can simply be downloaded again if lost, which is why this guide is lower priority than the security-focused ones in this hub. It matters more if you have spent time customising your setup, fine-tuning a model, or building something on top of Ollama that would take real effort to recreate.
Frequently asked questions
Do I need to back up Ollama’s models specifically?
Not usually, they can be re-downloaded. It is more important to back up any custom configuration or fine-tuned models.
How much space do Ollama models actually take up?
It varies widely by model, from under a gigabyte to tens of gigabytes for larger models. Check your specific setup with the command in this guide.
Should I back up to the cloud or a local drive?
Either works. A local external drive is simpler and faster for large model files; cloud backup adds protection against physical damage to your home.
Track your AI safety progress. Free.
Create a free account to tick off tasks, see your Security Score improve, and know exactly what you've done and what's still to do.
Start your free security check