
Joomla Backups: Strategy, Tools and Restore Testing
Ask any Joomla specialist about their worst support calls, and backups appear in every story. Not because backups are hard, but because they were missing, broken, or never tested, and by the time anyone noticed, the site was already gone. A good backup turns a disaster into an inconvenience. A bad one turns an inconvenience into a disaster.
This article explains how Joomla backups really work. It covers the basics for owners and editors, backup strategy and tools for administrators, and the technical details for developers who want to automate backup and restore. You will learn what exactly must be in a Joomla backup, how the 3-2-1 rule works, how to back up and restore by hand, how to move a site to another server, and why an untested backup is not a backup at all.
Nobody needs a backup - until the one moment they need nothing else.
The goal is simple: help you build a backup routine you can actually rely on.
1. The Basics
1.1 What a Joomla Backup Is
A Joomla site is two things that must always travel together:
| Part | Contains |
|---|---|
| The files | Joomla itself, your extensions and templates, uploaded images and documents, and configuration.php. |
| The database | All content: articles, categories, menus, modules, users, settings, and the data of your extensions. |
A backup of only the files gives you an empty site with no articles. A backup of only the database gives you content with no site around it and no images. A real Joomla backup always contains both, made at the same moment.
1.2 What Joomla Core Does (and Does Not) Provide
Joomla itself ships no backup feature. The closest the core comes is a reminder: the Joomla Update component shows a checkbox "I'm aware that a backup before any update is highly recommended" before it lets you update (the backupcheck option, enabled by default). Joomla reminds you; the actual backup is your job, done with a hosting tool, an extension, or your own script.
That is a deliberate choice, not a gap. Backups must be stored away from the site to be worth anything, and that is easier to arrange outside the CMS than inside it.
1.3 What Backups Protect You Against
- Hacks: restore a clean site instead of cleaning a compromised one file by file.
- Failed updates: roll back when a core or extension update goes wrong.
- Human error: a deleted category, an emptied article, a broken template edit.
- Server failure: disks die, hosts disappear, accounts get suspended.
- Ransomware: an off-site backup is the one copy an attacker cannot encrypt.
2. What Exactly to Back Up
2.1 The Files Side
Everything under the web root belongs in the backup, but some folders matter more than others:
| Path | Why it matters |
|---|---|
configuration.php |
Your settings, database credentials, and the $secret key. Irreplaceable. |
images/ |
All uploaded media. Usually the largest and least replaceable folder. |
templates/ |
Your templates, child templates, and every override you ever wrote. |
media/ |
Assets of installed extensions. |
administrator/, components/, plugins/, modules/, libraries/ |
Joomla and your extensions. Replaceable in theory, tedious in practice. |
Safe to exclude: cache/, administrator/cache/, tmp/, and log files. They are regenerated and only make the archive bigger.
2.2 The Database Side
Everything lives in the tables with your prefix (#__content for articles, #__users, #__menu, #__extensions, and so on). Dump them all: the cost of a few extra tables is nothing compared to the cost of a missing one. The one table you can safely skip is #__session - session data is worthless after a restore.
2.3 The Forgotten Pieces
Two things live outside the web root on well-configured sites and are forgotten in exactly that order:
- Relocated
tmpandlogfolders (if you moved them, as the security hardening article recommends). - Server configuration you customised: the
.htaccessor nginx rules, PHP settings, and cron jobs. Keep a copy or document them; a new server will not know them.
3. Backup Strategy: the 3-2-1 Rule
3.1 The Rule
The industry standard is called the 3-2-1 rule:
3 copies of your data (production + 2 backups)
2 different kinds of storage
1 copy off-site, away from the web server
The off-site copy is the heart of the rule. A backup on the same server dies with the server, gets encrypted with the site in a ransomware attack, and disappears with a suspended hosting account. "Off-site" can be cloud storage, another server, or a disk at the office - anywhere that does not share fate with production.
3.2 How Often to Back Up
Match the schedule to how fast the site changes and how much you can afford to lose:
| Site type | Sensible schedule |
|---|---|
| Brochure site, rarely edited | Weekly, plus before every update. |
| Active blog or business site | Daily database, weekly full. |
| Shop or community site | Daily full, hourly database if orders are at stake. |
And always, without exception: one extra backup right before any update or big change. It is the cheapest insurance in web development.
3.3 Generations and Retention
Keep multiple generations, not one rolling copy. A hack discovered after three weeks makes every backup of the last three weeks suspect; you want an older, clean generation to fall back on. A common scheme: keep 7 daily, 4 weekly, and a few monthly backups.
Mind privacy law here too: backups contain personal data, so your GDPR retention promises apply to them as well. A backup you keep for years quietly contradicts a privacy policy that promises deletion on request.
3.4 Full, Incremental, and Differential
Backup tools offer three ways to build an archive, and the words appear in every serious tool's options:
| Type | What it copies | Trade-off |
|---|---|---|
| Full | Everything, every time. | Largest and slowest to make, but every archive restores on its own. |
| Incremental | Only what changed since the previous backup. | Small and fast, but a restore needs the whole chain back to the last full backup - one broken link breaks the restore. |
| Differential | Everything changed since the last full backup. | Middle ground: a restore needs the last full plus the newest differential. |
For most Joomla sites a nightly full backup is the simplest and most robust choice; storage is cheap and independence pays off on the day you restore. Incremental schemes earn their keep on very large sites - a huge images/ folder, tight storage quotas - where copying everything nightly is not realistic.
3.5 Immutable Backups
Modern ransomware attacks backup storage first, then the site: encrypted backups make victims pay. The answer is immutable storage: backup space where files cannot be changed or deleted during a set retention window, not even with the storage account's own credentials. Cloud object storage offers this as an option (for example S3 Object Lock and comparable features at other providers), and some NAS systems offer immutable snapshots.
If your off-site storage supports an object lock or immutability option, switch it on for your retention window. It converts your off-site copy from "probably safe" to "provably out of reach".
Back to top4. Backup Tools for Joomla
4.1 The Three Roads
| Approach | Good for | Watch out for |
|---|---|---|
| Backup extension (Akeeba Backup is the de facto standard) | One-click full backups, scheduling, off-site upload, easy restore anywhere. | Backups stored inside the web root by default; move or upload them off-site. |
| Hosting panel backups (cPanel, Plesk, host snapshots) | Zero effort, runs even when Joomla is broken. | Same server, same account, host-controlled retention. Never your only copy. |
| Your own scripts (mysqldump + tar + cron) | Full control, ideal for developers managing many sites. | You are the vendor: you must monitor, test, and maintain them. |
4.2 Why Akeeba Backup Became the Standard
Akeeba Backup packages files and database into a single archive (its JPA format) together with a restore wizard. Restoring does not even require a working Joomla: you upload the archive plus the small Kickstart script to an empty folder, open it in the browser, and the wizard extracts the archive, imports the database, and rewrites configuration.php for the new location. That last part makes it double as a migration tool between servers and domains.
4.3 The Right Answer is Usually a Combination
Serious sites combine layers: a backup extension or script for the scheduled, off-site, restorable archive, and the hosting panel backup as a second, independent safety net. Two different mechanisms fail for different reasons - which is exactly the point.
Back to top5. Making a Manual Backup
5.1 When Manual is the Right Tool
Every administrator should have made at least one backup by hand: it teaches you exactly what a backup contains, and it works when nothing else does - a broken backend, a locked-out extension, a site you just inherited.
5.2 Step by Step on the Command Line
The credentials you need are in configuration.php ($host, $user, $password, $db). With those:
# 1. Optional: take the site offline during the backup
php cli/joomla.php site:down
# 2. Dump the database (single transaction = consistent dump)
mysqldump --single-transaction -h localhost -u dbuser -p sitedb \
> site-$(date +%F).sql
# 3. Archive the files, excluding regenerated folders
tar --exclude='./cache' --exclude='./tmp' \
--exclude='./administrator/cache' \
-czf site-$(date +%F).tar.gz .
# 4. Bring the site back
php cli/joomla.php site:up
# 5. Move both files OFF the server
scp site-*.sql site-*.tar.gz backup-user@backup-host:/backups/
Step 5 is not optional. A backup that stays in the web root is a security risk (anyone who guesses the name can download your whole site, credentials included) and dies with the server.
5.3 Without Shell Access
On shared hosting without SSH: export the database with phpMyAdmin (select the database, Export, SQL format) and download the files with the hosting panel's file manager as a compressed archive. Avoid plain FTP for thousands of small files; it is slow and silently drops files far more often than people think.
Back to top6. Automating Backups
6.1 A Backup You Have to Remember is a Backup You Will Forget
Manual backups decay: they happen weekly, then monthly, then never. Automate the routine and keep the manual skill for emergencies and pre-update snapshots.
6.2 The Scheduling Options
- Server cron: the most reliable trigger. A cron job runs your backup script (or the backup extension's CLI command) at a fixed hour, typically at night.
- Joomla's Task Scheduler: core ships no backup task, but backup extensions register their own task plugins, and the scheduler (triggered by real cron or the web-cron URL) runs them. Convenient when you have no shell access.
- The hosting panel: automatic account snapshots. Enable them as the extra layer, not the primary.
6.3 Monitor the Automation
The most dangerous backup is the one that stopped running months ago while everyone slept well. Close the loop:
- Let the backup job send a notification - and treat silence as the alarm, not the failure mail. A dead job sends nothing.
- Check the age and size of the newest backup regularly; a sudden 90% size drop means something broke quietly.
- Put a calendar reminder on it: once a month, look at the backup storage with your own eyes.
7. Restoring a Backup
7.1 Restoring with a Wizard
With an Akeeba-style archive: upload the archive and Kickstart to the (empty) target folder, open Kickstart in the browser, and follow the wizard. It extracts the files, creates and fills the database, asks for the new database credentials, writes configuration.php, and cleans up after itself. Ten minutes, most of it waiting.
7.2 Restoring by Hand
The manual route mirrors the manual backup:
- Upload and extract the file archive into the web root.
- Create an empty database and user, and import the dump:
mysql -u dbuser -p sitedb < site.sql - Open
configuration.phpand fix what changed:
public $host = 'localhost'; // new DB host
public $user = 'new_dbuser'; // new DB user
public $password = '...'; // new DB password
public $db = 'new_sitedb'; // new DB name
public $dbprefix = 'jos_'; // must match the dump!
public $tmp_path = '/new/path/tmp'; // absolute paths: update them
public $log_path = '/new/path/logs';
public $live_site = ''; // leave empty unless you know why
- Check file ownership and permissions (files
644, folders755, owned by the PHP user). - Test the frontend, the backend login, and one image upload. Run System → Database (or
php cli/joomla.php maintenance:database) to verify the schema.
7.3 Restoring After a Hack
One special rule applies: restore to a point before the compromise, not just before you noticed it, and investigate the entry point before going live again - otherwise you restore the vulnerability along with the site. The incident response section of the security hardening article covers that order of work.
Back to top8. Moving a Site to Another Server or Domain
8.1 A Migration is a Restore
The insight that makes migrations calm instead of scary: moving a Joomla site is exactly a backup restored somewhere else. Same archive, same steps, different target. If your backup routine works, you already know how to migrate.
8.2 The Extra Steps for a New Home
- Restore the backup on the new server (wizard or manual, as above).
- Update
configuration.phpfor the new database and paths. - Test the site via a temporary URL or a local hosts-file entry pointing the domain at the new server, before touching DNS.
- Install the SSL certificate on the new server before switching, so HTTPS never breaks.
- Lower the DNS TTL a day ahead, switch the DNS, and keep the old server running read-only for a few days as a fallback.
8.3 Domain Changes
Joomla stores internal links relative, so a domain change is milder than it sounds. Check the few absolute spots: hard-coded URLs in articles or custom modules, $live_site (should normally stay empty), and the domain in your SEF/redirect rules in .htaccess. Then set up 301 redirects from the old domain and update Search Console, as the redirects article describes.
9. Testing Your Backups
9.1 An Untested Backup is a Hope
Backups fail silently: truncated dumps, archives missing half the images folder, credentials that no longer decrypt, a format the new PHP version cannot read. None of that shows until you restore. The only proof a backup works is a completed test restore - everything else is optimism.
9.2 The Restore Drill
Twice a year (and after every change to the backup setup), run the drill:
- Take a current backup from the off-site storage - not from the server.
- Restore it to a separate location: a local Docker stack, a subdomain, or a scratch VPS.
- Walk a checklist: frontend renders, backend login works, newest article present, images load, one form submits.
- Note how long it took. That number is your real recovery time, and it is worth knowing before an outage.
The drill has a bonus: a restored copy is a perfect staging site for testing the next big update.
It also has less friction than it seems, because a wizard restore is a predictable browser flow - which means you can automate it. I run my own restore drills with a small Playwright script (a browser automation tool) that uploads the archive, clicks through the Kickstart wizard, and leaves a fresh copy of the site running in a local Docker stack: restoring a site is one command. The lower you make the friction, the more often the drill actually happens - and a drill that happens beats a perfect procedure that stays theoretical.
9.3 From Backup to Disaster Recovery Plan
Professionals describe recovery with two numbers, and both are decisions you should make consciously per site:
- RPO (Recovery Point Objective): how much data you can afford to lose. A nightly backup means an RPO of up to 24 hours - acceptable for a brochure site, painful for a shop.
- RTO (Recovery Time Objective): how fast the site must be back online. Your restore drill measures whether reality matches the ambition.
The second half of a disaster recovery plan is documentation, because a backup only recovers a site if someone can actually execute the restore. Write down: where the backups and their encryption passwords live, the step-by-step restore procedure, the credentials needed (hosting, DNS, database), and who to call. Store that document outside the site itself - a wiki, a password manager note, a printed page in a drawer. The test is simple: could a colleague restore the site while you are unreachable on holiday?
Back to top10. Under the Hood (Developer View)
10.1 Where Things Actually Live
Knowing what is stored where tells you instantly what a partial loss costs:
| Content | Database | Files |
|---|---|---|
| Articles, categories, tags | #__content, #__categories, #__tags |
- |
| Menus, modules, their settings | #__menu, #__modules |
- |
| Users, groups, ACL rules | #__users, #__usergroups, #__assets |
- |
| Uploaded images and documents | only the references | images/ |
| Template overrides, custom CSS | - | templates/, media/templates/ |
| Extension code | registration in #__extensions |
their folders |
| Site configuration | - | configuration.php |
The classic partial-loss trap: database restored, images/ forgotten. Every article renders, every image is broken, and the CMS reports no error at all - because the references in the database are intact.
10.2 Consistency: Files and Database from the Same Moment
A dump from Monday with files from Thursday is a subtly broken site: articles referencing images that do not exist yet, extensions whose tables do not match their code. Back up both parts in one run, ideally with the site briefly offline or during the quietest hour. For the dump itself, mysqldump --single-transaction gives you a consistent snapshot of InnoDB tables without locking the site.
10.3 The Secret Key is Part of the Backup
The $secret value in configuration.php is used in token and HMAC calculations, including Web Services API tokens. Restore a site with a different secret and every issued API token dies at once. This is one more reason configuration.php must be in the backup, and why the backup archive itself deserves password protection or encryption: it contains database credentials and this key in plain text.
10.4 Useful CLI Commands Around Backups
php cli/joomla.php site:down # maintenance mode on
php cli/joomla.php site:up # maintenance mode off
php cli/joomla.php config:get # read configuration values
php cli/joomla.php maintenance:database # check/fix schema after restore
php cli/joomla.php scheduler:run # trigger due scheduled tasks
Core ships no backup:* command - the commands above are the scaffolding around your own mysqldump and tar calls, or the CLI that a backup extension provides.
11. Backups and the Web Services API
The Joomla Web Services API has no backup endpoints: you cannot trigger or download a backup via /api/index.php/v1/... with core alone. That is sensible - streaming a full site archive through the CMS it is supposed to protect would be fragile and risky.
Remote backup automation therefore runs on other rails: SSH for script-based setups, the JSON APIs that backup extensions expose for fleet tools (this is how services that manage many Joomla sites trigger nightly backups remotely), or the hosting provider's own API for account snapshots. What the Web Services API is good for in this context is monitoring: a fleet script can call a site's API to verify it is up and on the expected Joomla version after a restore completes.
Back to top12. SEO and Metadata
Backups protect your SEO more directly than most people realise. Rankings live in your content, your URL structure, your redirects, and your metadata - all of it in the database. Losing a site without a backup does not just cost you a website; it costs you years of accumulated search authority, because the rebuilt site never matches the old URLs exactly and every mismatch bleeds ranking.
Two practical points. First, a fast, complete restore keeps downtime short; extended outages get pages dropped from the index, and recovery is slow. Second, when you test restores on a public staging location, block indexing there (a noindex header or robots rule): a crawlable copy of your site on another URL creates duplicate content that competes with the original. The robots.txt article covers the mechanics.
13. Common Mistakes and Pitfalls
13.1 The Backup Lives on the Server it Protects
Symptom: backups exist, but the server crash / hack / account suspension took them down together with the site.
Fix: apply the 3-2-1 rule. At least one current copy must live somewhere that shares no fate with the web server, and the web root is the worst place of all - there it is also downloadable by attackers.
13.2 Only the Database, or Only the Files
Symptom: after a restore, a site with no articles - or all articles with every image broken.
Fix: a Joomla backup is files plus database from the same moment. Check that both are in the archive and that images/ and configuration.php are actually inside.
13.3 The Untested Backup That Cannot Be Restored
Symptom: the restore fails on the worst day - corrupt archive, incomplete dump, forgotten password on the encrypted backup.
Fix: run the restore drill from section 9 twice a year. Store the backup encryption password in your password manager, not only in the tool that made the backup.
13.4 Relying Solely on the Host
Symptom: "the hosting company makes backups" turns out to mean 7 days of retention, and the hack is 12 days old.
Fix: host backups are a bonus layer. Keep your own schedule with your own retention (dailies, weeklies, monthlies), under your own control.
13.5 The Automation That Silently Died
Symptom: the last backup is from March. It is November.
Fix: monitor for the absence of backups, not just failures: a monthly check of the newest file's date and size, and alerting that notices when the nightly job stops reporting.
13.6 Restoring Over the Only Evidence
Symptom: after a hack, the site was restored immediately - and now nobody can find out how the attacker got in, and they return within a week.
Fix: before restoring, preserve a copy of the compromised state (files + logs) for investigation, then restore to a clean point and close the entry hole. Containment first, restore second.
Back to top14. Best Practices
If you remember only a few things from this article, remember these:
- A Joomla backup is always files plus database, from the same moment.
- Follow 3-2-1: three copies, two kinds of storage, one off-site.
- Automate the schedule, monitor that it keeps running, and keep generations (daily/weekly/monthly).
- Make an extra backup before every update - the checkbox in Joomla Update is there for a reason.
- Never leave backup archives inside the web root; encrypt archives that leave the server.
- Test a full restore twice a year and time it; an untested backup is a hope, not a plan.
- Document the restore procedure - where backups live, how to restore, who to call - so recovery never depends on one person's memory.
- Treat a migration as a restore to a new location - same routine, new target.
- After a hack, restore to a point before the compromise and find the entry point first.
- Remember GDPR: backups contain personal data, so retention rules apply to them too.
15. Quick Reference
CONTENT files: configuration.php, images/, templates/, media/,
extension folders (skip cache/, tmp/, logs)
db: all #__ tables (skip #__session)
RULE 3 copies - 2 storage types - 1 off-site
extra backup before EVERY update
generations: 7 daily / 4 weekly / few monthly
full = independent restore, incremental = chained
immutable storage (object lock) resists ransomware
MANUAL php cli/joomla.php site:down
mysqldump --single-transaction -u USER -p DB > site.sql
tar --exclude='./cache' --exclude='./tmp' -czf site.tar.gz .
php cli/joomla.php site:up
scp both files OFF the server
RESTORE extract files > create db > import dump
fix configuration.php: $host $user $password $db
$dbprefix $tmp_path $log_path
permissions 644/755, test frontend + backend + upload
php cli/joomla.php maintenance:database
MIGRATE = restore on the new server
test via temp URL > install SSL > then switch DNS
TEST restore drill 2x/year to a separate location
check: pages, login, newest content, images, forms
note the recovery time
RPO = max data loss, RTO = max downtime
document: locations, procedure, credentials, contacts
TOOLS extension (Akeeba: JPA + Kickstart, restores anywhere)
+ host panel backups as second layer
+ own mysqldump/tar scripts for full control
MONITOR alert on missing backups, not only failed ones
watch newest file age + size monthly
API/CLI no core backup:* command, no REST backup endpoint
site:down / site:up / config:get / maintenance:database
Back to top16. Summary
Backups are the one part of site maintenance where "almost right" equals "wrong":
- Both halves: files and database together, from the same moment - Joomla core reminds you before updates but does not back up for you.
- Strategy: the 3-2-1 rule, generations with sensible retention, and an extra snapshot before every change that matters.
- Tools: a backup extension or your own scripts for the real, off-site, restorable archive; hosting backups as the independent second layer.
- Restore: wizard or manual, the steps are learnable in an afternoon - and a migration is just a restore pointed at a new server.
- Testing: the restore drill is what turns a pile of archives into an actual safety net, and it tells you your true recovery time.
- Care: keep archives out of the web root, encrypt what leaves the server, monitor the automation, and respect data retention.
The uncomfortable truth about backups is that their quality is only revealed at the worst possible moment. The comfortable truth is that a solid routine - automated, off-site, generational, tested - is neither expensive nor complicated to set up. It is one afternoon of honest work.
If you do not know, right now, how old your newest backup is, where it lives, and how long a restore would take, that is worth finding out this week rather than during an outage. Reviewing and drill-testing a backup setup is a small, methodical job - and exactly the kind of thing a Joomla specialist can set up once so that it quietly works for years.
Back to top

Peter is a Joomla specialist and a Linux admin for fast, secure and scalable websites.












