BTRFS had a good run—it served us well in Enhance v11, but with Enhance v12, it’s time to face the truth: BTRFS is on its way out, and Ext4 is the new sheriff in town. If you’re running a BTRFS backup server, you’ll need to transition sooner or later. This guide walks you through the easiest ways to switch, whether you want to set up a new backup server or reformat your existing one without losing data.
You have two options:
- Migrate to a fresh Ext4 backup server, move the backup role over, and keep the old BTRFS backups accessible manually for a while before retiring the server.
- Reformat your existing backup server in place, either by backing up your data first or starting fresh without old backups.
Whichever path you choose, we’ve got you covered with a step-by-step guide.
Option 1: Migrate to a New Ext4 Backup Server
Step 1: Set Up Your Brand-New Ext4 Backup Server
First things first, get yourself a fresh Ext4 backup server. Our VPS provider of choice is AlphaVPS—for just €4, you get 1TB storage, 2GB RAM, and a 10Gbps link in their DE location. But feel free to follow this guide with any Ext4 server you like.
Once you have your new server:
- Upgrade it to Ubuntu 24.04 (Follow this guide if you need help).
- Install Enhance.
- Add the Backup Role in Enhance.
That’s it—Enhance v12 makes this plug-and-play. No extra setup needed.
Step 2: Trick Your Old BTRFS Backup Server
On your existing (and soon-to-be-retired) BTRFS backup server, run this command:
cd /backups
for dir in *; do mv "$dir" "${dir}.temp"; done
This renames your backup directories, making Enhance think there are no backups. It allows you to migrate the backup role without Enhance getting confused or you losing your mind!
Step 3: Move the Backup Role to the New Server
- In your Enhance control panel, go to Servers → Old BTRFS Backup Server → Backups Tab.
- Click “Remove Role”, then “Move Websites”.
- Enhance will list all websites (pre-selected). Just pick your new Ext4 backup server in backup role below and hit “Next”.
- Wait for it to finish—it won’t take long since your backup role is technically “empty” now.
Step 4: Remove the Old BTRFS Server from Enhance
- In Enhance, go to the Old BTRFS Server page.
- Click the three dots (top-right corner) → Delete → Confirm.
- Once Enhance removes it, log in to the BTRFS server’s terminal and restore the original backup names:
cd /backups
for dir in *.temp; do mv "$dir" "${dir%.temp}"; done
That’s it! Your new Ext4 backup server is active, and your old BTRFS backups are still intact—just in case.
How to Manually Restore Backups from Your Old BTRFS Server
We see the question coming: “What if a client needs a backup from my old BTRFS server?” No worries, we got you. Here’s how to manually restore snapshots:
Step 1: Find the Website’s Backup
Run the following command in your backups directory to list snapshots with human-readable timestamps:
cd /backups/website-id/
for snapshot in snapshot-*; do
timestamp=${snapshot#snapshot-}
timestamp=$((timestamp / 1000))
echo "$(date -d @$timestamp '+%Y-%m-%d %H:%M:%S') --> $snapshot"
done | sort
Example output:
2025-01-27 02:09:44 --> snapshot-1737936584389
2025-01-28 02:10:56 --> snapshot-1738023056639
2025-01-29 02:08:25 --> snapshot-1738109305525
Pick the snapshot you need to restore.
Step 2: Extract Snapshot Files to a Writable Directory
BTRFS snapshots are read-only, so you need to extract them first:
cd /
mkdir -p /restore_temp
rsync -a --info=progress2 /backups/website-id/snapshot-1738800628539/ /restore_temp/
Step 3: Transfer Files to Your Client’s Server
Now, copy the extracted website files to the actual app server:
rsync -avz --info=progress2 /restore_temp/ root@app-server:/var/www/website-id/
Step 4: Restore the Database
If your backup includes a database, you’ll need to restore it. On the app server:
su - username
mysql -u db_username -p database_name < your_backup.sql
And that’s it! Website restored, crisis averted.
Option 2: In-Place Migration (Reformatting the Same Server)
If you don’t want to set up a new backup server and prefer to reformat your existing BTRFS backup server to Ext4, you can migrate in place using this method.
Step 1: Decide Whether to Keep Backup Data
You have two options:
- Keep the Backup Data – Before reformatting, you can take a copy of your backups using our script:
👉 How to Backup Your Enhance BackupsIf you only need to back up specific sites, we created a modified version of the script:
👉 Selective Backup Script - Start Fresh – If you don’t need old backups, you can simply proceed without saving any data. This is only recommended if you have no intention of keeping past backups.
Step 2: Migrate the Backup Role Temporarily
- Rename your backups so Enhance doesn’t detect them:
cd /backups for dir in *; do mv "$dir" "${dir}.temp"; done
- Move the backup role temporarily to another server in your Enhance cluster.
Step 3: Reformat and Restore the Backup Role
- Reformat the existing backup server to Ext4 .
- Move the backup role back to the reformatted server.
This method worked seamlessly on both our cluster and another client’s cluster. If you need to restore any old backups manually, follow the Manual BTRFS Backup Restoration steps above.
Enhance v12 Launch Special is Back! – Limited-Time Discount on cPFence
Based on customer requests, we’re bringing back our cPFence Unlimited Server License Discounts for a limited time:
🔥 Coupon v12ONE – $38 (instead of $48) for 1 unlimited server license (yearly purchases only).
🔥 Coupon v12TEN – $250 (instead of $300) for 10 unlimited server licenses (yearly purchases only).
Offer expires in 7 days, so grab yours now:
👉 Get your cPFence License
And there you have it! A smooth migration from BTRFS to Ext4, a safety net for old backups, and a guide to restoring them when needed. Now, enjoy Enhance v12—no more BTRFS headaches.
No comment