# 💾 Database Backups

The Database Backup & Restore feature helps ensure your POS system data is protected and recoverable. Whether you’re upgrading the system, migrating to a new server, or just preparing for the unexpected, backups help you stay safe with minimal effort.

<figure><img src="https://2303123582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg970NsjedQxcUQ2m-0%2Fuploads%2FxF78YACDIvntLMS4T5TT%2Fimage.png?alt=media&#x26;token=76639f27-d4ba-41e8-b582-8769f8c0cb37" alt=""><figcaption></figcaption></figure>

***

### 🔐 Why Use Database Backups?

\


Keeping regular backups is essential for maintaining data integrity and business continuity. Here’s why:

* ✅ Data Protection – Safeguard important records from accidental deletion, hardware failure, or system corruption.
* 🔄 Easy Recovery – Restore the system to a previous state in just a few clicks if something goes wrong.
* 💼 Business Continuity – Prevent costly downtime by having a fallback available.
* 🧠 Peace of Mind – Confidently perform updates or customizations knowing your data is backed up.

***

### ⚙️ How to Use



#### 📤 Creating a Backup

1. Navigate to Settings > Database Backups.
2. Click the “Generate Backup” button.
3. The system will create a .sql file containing your entire database snapshot and store it on the server.

\


> 🛑 Note: For security reasons, backup files are not downloadable directly through the browser. To access them, use server-level access such as FTP or your hosting control panel.

***

#### 📥 Restoring a Backup

1. Go to Database Backups in the admin panel.
2. Locate the desired backup from the list.
3. Click the “Restore” button next to the backup file.
4. Confirm the restore action.

\


> ⚠️ Warning: This process will overwrite your current database. Double-check before restoring — it cannot be undone.

***

### 🧹 Managing Backups

* You can delete old backups to free up server space.
* It’s good practice to retain at least the last 3–5 backups.
* Use the timestamped file names to identify which version to keep or restore.

***

### 🔄 Backup Best Practices

| Task             | Recommendation                                      |
| ---------------- | --------------------------------------------------- |
| Backup Frequency | Weekly (or daily for active setups)                 |
| Before Updates   | Always create a backup before applying changes      |
| Storage          | Store securely on server/cloud                      |
| File Naming      | Use a consistent pattern like backup-YYYY-MM-DD.sql |

***

### 🛠️ Troubleshooting

* ❌ Restore Fails?
  * Ensure the .sql file is valid and not corrupted.
  * Check server permissions (especially write access).
* ❌ Cannot Create Backup?
  * Verify the server has enough disk space.
  * Check file/folder permissions.
* ❌ Missing Data After Restore?
  * Ensure you selected the correct backup file.
