IPTVBlog
Search IPTVBlog

Guide· intermediate

IPTV panel backups: what to back up and how to prove restores

IPTV panel backups: database, media and config, retention, off-site S3 or B2 storage, encryption, RPO and RTO in plain words, and a restore drill you repeat.

By
Published
Reading time
9 min · 2,029 words
"Backups – prove the restore" beside a stack of storage drives with an arrow looping back into a server rack

Numbers are rules of thumb

Sizing figures here are labelled estimates from operating experience, not measurements of your setup. Test with your own channel list and audience before committing.

IPTV panel backups are the task nobody checks until the day they matter. That day is a failed disk, a suspended hosting account or a bad update at midnight. This guide separates what you must back up from what you can rebuild. You get a cheap retention and off-site layout, encryption without theory, RPO and RTO in plain words, and a restore drill you repeat every quarter.

The guide is written for self-hosted panels; a section at the end covers what changes with a hosted one.

Short version: The database is your business and it is small: dump it at least nightly, encrypt it, send it to object storage at a different provider, keep a month of dailies and a year of monthlies. Config and certificates go with it. Media is optional and expensive; back up what you cannot re-acquire. None of that counts until you have restored it on a clean server, timed it, and written down what broke.

Three kinds of data, three different plans

A panel server holds data with very different values per gigabyte.

Kind Examples Size Changes If lost
Database Lines, resellers, credit ledger, streams, bouquets, EPG mappings, orders, invoices, tickets Hundreds of MB to a few GB Constantly The business is gone
Configuration Panel config files, reverse proxy config, TLS certificates and keys, firewall rules, cron jobs, environment files with secrets Megabytes Rarely Hours of rebuilding, downtime
Media VOD files, catch-up recordings, 24/7 channel sources, logos Terabytes Daily growth Re-acquire or lose the catalogue

Database

This is the asset. It holds every customer line, every reseller’s credit balance, every order and invoice. Nothing else on the server matters if this is gone, and nothing else is as cheap to back up.

Dump it with the database’s own tool (mysqldump or mariadb-dump for the Xtream UI and XUI One family, pg_dump for PostgreSQL-based panels) rather than copying data files, so the dump is consistent and restorable on a different version. Use the flags that give a consistent snapshot without locking the panel for the duration (--single-transaction for InnoDB tables). Compress it. A panel with tens of thousands of lines produces a dump you can e-mail; disk is not the constraint.

Check the dump every time. The most common silent failure is a cron job that writes a file containing one line of error and reports success. A rule of thumb: alert if the compressed dump is smaller than 80 percent of yesterday’s, and open the start of the file after any credential or version change. The uninstall guide carries the same warning for the export before a migration.

Configuration

Small, boring and the reason a restore takes six hours instead of one. Collect into a daily archive:

  • The panel’s configuration directory and any environment or .ini file with database credentials and API keys.
  • Reverse proxy or web server configuration.
  • TLS certificates and private keys, so the restored server answers on the same hostnames at once.
  • Firewall rules, fail2ban jails, cron tables, systemd units you added.
  • A text file listing software versions, server IPs and the DNS records you depend on.

Treat this archive as secret; it contains keys.

Media

Here you decide what is worth paying to store twice.

  • Catch-up recordings expire by design. Do not back them up.
  • VOD you can re-acquire from a licensed source is cheaper to fetch again than to store twice. Back up the catalogue metadata and the acquisition list instead.
  • VOD you cannot get again, your own productions or one-time deliveries, deserves a real off-site copy.
  • Logos, EPG source files and 24/7 channel sources are small; include them with config.

For the files you do keep, an incremental tool (restic, borg, rclone with a versioned bucket) copies only changes and keeps history.

Diagram: the main server sends an encrypted nightly database dump and config archive to an off-site bucket at another provider; load balancer media is handled separately; a temporary restore host pulls from the bucket with a read-only key

Retention

Keep copies old enough to predate a problem you have not noticed yet. Corruption, a deleted reseller or a mistaken bulk edit often surfaces days later; if you only keep last night’s dump, you have a perfect copy of the damage.

A common schedule for a small operator, as a starting point:

Copy Keep
Hourly or every few hours (database only) 2 days
Daily 30 days
Weekly 3 months
Monthly 12 months, longer if your bookkeeping rules say so

Compressed database dumps at this schedule fit in a few gigabytes for most panels. Write the retention into the backup tool’s policy (restic forget --keep-daily 30 --keep-weekly 12 --keep-monthly 12, or lifecycle rules on the bucket), not into a script you have to remember to run.

Invoices and ledger exports have their own legal retention, often six to ten years depending on your country. Export them from the panel and keep them as documents, separately from the database dumps that you will eventually delete.

Off-site: S3-compatible object storage

The backup must live somewhere a failure of the server, the data centre or the hosting account cannot reach. Object storage from a different provider is the standard answer: Backblaze B2, Wasabi, Hetzner Object Storage, Cloudflare R2, Amazon S3 or any S3-compatible service.

Rules that make it a real off-site copy:

  • Different provider from the servers, or at least a different account and region. A suspended hosting account takes its own snapshots and storage with it.
  • Append-only credentials on the server that uploads, so a compromised server cannot delete the history. Most providers offer keys that write but cannot delete, or object lock with versioning on the bucket.
  • A separate read key that lives only on your workstation and in the password manager.
  • Checksums recorded at upload and verified at restore. restic and borg do this; with plain rclone or aws s3 cp, record a SHA-256 alongside.

Provider snapshots are useful for rollback before an update. They are not off-site and not a substitute.

Encryption

Your backups contain every customer’s name, e-mail, IP history and payment references, plus the panel’s own secrets. Encrypt before the data leaves the server.

The practical options:

  • restic or borg encrypt everything by default with a repository password. One tool handles encryption, deduplication, retention and verification. For most operators this is the right choice.
  • age or GPG on a plain dump before you upload it with rclone, if you prefer simple files you can decrypt anywhere.
  • Provider-side encryption (the bucket encrypts at rest with the provider’s keys) protects against someone stealing the provider’s disks and nothing else. It is not a substitute for encrypting with your own key.

The key or repository password is the thing people lose. Store it in the team’s password manager and in one offline place that is not the server, and reference it in the runbook by location, never by value. A backup you cannot decrypt is a very secure way of having no backup.

RPO and RTO in plain words

Two terms from disaster-recovery planning are worth learning because they turn “we have backups” into decisions.

RPO, recovery point objective, is how much recent data you accept losing. Worked example: you dump the database at 03:00 and the disk dies at 22:00. You lose nineteen hours of renewals, orders and ledger rows. If that hurts, dump more often or replicate the database to a second server.

The database is small, so an hourly dump is cheap. Pick the RPO by asking what you would have to re-enter by hand from e-mails and bank statements.

RTO, recovery time objective, is how long you accept being down. It is set by the slowest step of the restore, which is almost never the database import: finding the key, provisioning a server, remembering the firewall rules, reissuing certificates, updating DNS. The only way to know your RTO is to run the drill and time it.

Write both numbers down. Then compare them with what the drill shows. The gap is your to-do list.

The restore drill

A backup that was never restored is a hope. The drill below takes an afternoon the first time and an hour once the runbook exists. Run it on a clean temporary server, never on production, and never by pointing the restored panel at production’s load balancers.

Timeline of the eight restore drill steps, from picking the backup to scheduling the next drill, with the stopwatch running from provisioning to verification and the backup timestamp marked as the recovery point

Drill checklist

  1. Pick the backup. Last night’s dump and config archive, fetched from the off-site bucket with the read key, not from the production disk. Its timestamp is the recovery point you are testing.
  2. Provision a clean host. Same OS version as production, no network path to production. Install the panel at the backup’s version. Start the stopwatch.
  3. Fetch and decrypt. Verify checksums, decrypt with the key from the password manager. If anyone has to ask where the key is, that is finding number one.
  4. Restore. Create the database, import the dump, place config files, start services. Every error goes into the runbook with its fix.
  5. Verify from the application, not the shell. Log in. Compare line count, reseller balances, stream count and the latest order with production as of the backup time. Create a test line and query the Xtream API with it.
  6. Record. Elapsed time (your real RTO), backup timestamp versus failure time (your real RPO), the problems, the date, who ran it.
  7. Destroy the host and every local copy of the dump. A forgotten restore host is a second copy of the customer database with last week’s patches.
  8. Schedule the next one. Quarterly, and after any major panel or database version change; a dump from version N does not always import into N+1.

Keep the runbook as a plain text file in two places. The person running the real restore at 3 a.m. may not be the person who wrote it.

What a hosted panel changes

With a hosted panel, the vendor runs the panel software and backs it up on its own schedule. Where the database lives depends on the product: some vendors host it, others keep it on your main server. Check that before you drop the database dump from your list, then ask the vendor:

  • How often is the panel backed up, how long are copies kept, and can you download one yourself?
  • Does an update always follow a fresh, verified backup, and can an update be rolled back?
  • What exactly is covered: the panel, the database (and where it lives), media on your servers?
  • What happens to your data and backups if you cancel?

IPTVOS, an advertiser on IPTVBlog, backs up hosted panels daily (every 12 hours on its Enterprise plan) with copies the customer can restore. Its database lives on your main server, which dumps it nightly at 03:30 and keeps seven days; media on load balancers is not backed up, and a hot standby for the main server is planned, not shipped. The IPTVOS review has the rest. Whatever hosted panel you use, your own servers, media and local configuration stay your responsibility, and the drill above still applies to them.

What to do next

  • Tonight: confirm a database dump exists, open it, and check its size against yesterday’s.
  • This week: set up restic or borg to an S3-compatible bucket at another provider with an append-only key, encrypted with a password stored in the password manager and one offline place.
  • This month: run the restore drill, write the runbook, and put your measured RPO and RTO next to the ones you want.
  • Then read the server requirements guide to size the restore host.

Questions people ask

How often should I back up an IPTV panel database?

At least nightly, and more often if losing a day of line renewals and payments would hurt. The database is small compared with media, so a dump every few hours costs little. Pick the interval from how much data you can afford to re-enter, then automate it.

Do I need to back up VOD files?

Only if you cannot get them again. Files you can re-acquire or re-encode from a source are cheaper to re-download than to store twice. Catch-up recordings expire on their own. Back up the catalogue metadata (which titles exist, their paths) so you know what to rebuild.

Is a server snapshot a backup?

It is a convenient one for rollback before an update, and a poor one for disaster recovery. Snapshots sit at the same provider as the server, often in the same data centre, and a hosting account suspension takes them with it. Keep snapshots for rollback and a separate off-site copy for recovery.

What does a hosted panel back up for me?

It depends on the product. Most back up the panel on the vendor's schedule, but some keep the database on your own main server, so check where it lives. Check whether you can download a copy, how long copies are kept and what happens to them if you leave. Your stream servers, media and any local configuration remain yours to back up.

Topicsoperationsbackups

Comments

Keep reading