Mods

How to Use the Backup Plugin in XFile Ultra

Step-by-step Backup plugin setup: database and website backups, SSH destination, private key or password with sshpass, schedule, retention, and test run.

How to Use the Backup Plugin in XFile Ultra

This guide walks you through the Backup plugin in plain language. When it is set up, XFile Ultra can copy your database and/or website files to another server over SSH, on a schedule or when you click Run now.

You do not need to be a developer — but you will need a second server (or VPS) where backups can land, plus SSH access to that machine.

---

Before you start

1) Buy and unlock the plugin

Backup is a premium plugin.

1. Buy Backup on xfileultra.com

2. In your install: Admin → Settings → Main → Site identity → refresh / re-check the license

3. Until the license includes Backup, the Backup page stays locked

2) Open the Backup page

Go to:

Admin → Backup

(That is a dedicated page in the admin menu — not buried under Settings → Mods.)

3) Have a backup destination ready

You need another machine with:

  • SSH access (host, port, username)
  • A folder where backups can be written (for example /home/backup/xfileultra)
  • Enough disk space

Prefer a private SSH key. Password login is optional and needs an extra package on the main XFile Ultra server (see below).

---

What Backup can save

On the Backup page, under What to backup:

Option What it does Default
Backup database Saves a PostgreSQL dump (your users, settings, files metadata, and so on) Usually on
Backup website files Copies the application files (the script itself) to the remote server Usually off

Turn on at least one. You can turn both on for a fuller backup.

Important limits (read this)

  • Member uploads are not included in website backup. Photos, videos, and other uploaded files live on storage / CDN and need their own backup plan.
  • Website backup skips heavy or sensitive items such as node_modules, .next, .git, and .env files.
  • There is no “Restore” button in the admin. Restore means you (or your host) put the remote SQL / files back manually when needed.
  • Local backup folders on the main server are only temporary staging. The lasting copy is on the remote SSH server.

---

Fill in the remote SSH destination

Under Remote SSH destination:

Field What to enter
SSH host Hostname or IP only — example backup.example.com or 203.0.113.10. Do not write ssh://, user@, or a path here
SSH port Usually 22 (leave empty to use 22)
Remote backup path Absolute folder on the backup server — example /home/backup/xfileultra. Must start with /
SSH username The Linux user on the backup server — example backup or root
SSH private key Paste the full private key (preferred)
SSH password (optional) Only if you use password login and sshpass is installed on the main server

After saving, use Test connection before you trust the schedule.

---

Option A — SSH private key (recommended)

A private key is the best choice for scheduled backups. XFile Ultra can log in without typing a password each time.

Create a key pair (on your computer or the main server)

Run these commands in a terminal:

# Create a new key (press Enter for default path, optionally set a passphrase)
ssh-keygen -t ed25519 -C "xfileultra-backup" -f ~/.ssh/xfileultra_backup

# If your system is older and ed25519 fails, use:
# ssh-keygen -t rsa -b 4096 -C "xfileultra-backup" -f ~/.ssh/xfileultra_backup

That creates two files:

File Keep private? Role
~/.ssh/xfileultra_backup Yes — never share publicly Private key → paste into XFile Ultra
~/.ssh/xfileultra_backup.pub Safe to install on the backup server Public key → goes into authorized_keys

Install the public key on the backup server

On the backup machine, as the SSH user you will use:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
# Paste the ONE line from xfileultra_backup.pub, save, then:
chmod 600 ~/.ssh/authorized_keys

Or from your laptop (replace user/host):

ssh-copy-id -i ~/.ssh/xfileultra_backup.pub USER@BACKUP-HOST

Paste the private key into XFile Ultra

1. Show the private key:

cat ~/.ssh/xfileultra_backup

2. Copy everything, including the begin/end lines, for example:

-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----

3. Paste into SSH private key on Admin → Backup

4. Click Save backup settings

5. Click Test connection

If the test succeeds, you are ready for Run now or a schedule.

Tip: if your private key has a passphrase, scheduled backups may fail unless the key is unprotected or you use another auth method. For automation, many admins generate a dedicated backup key without a passphrase and restrict it to the backup user only.

---

Option B — SSH password + sshpass (optional)

You can use SSH password instead of a key, but the main XFile Ultra server (the machine running the script) must have sshpass installed. Without it, password backups fail with a message telling you to install sshpass or use a private key.

Install sshpass on the main server

On Debian / Ubuntu:

sudo apt update
sudo apt install -y sshpass

On RHEL / Alma / Rocky (if available in your repos):

sudo dnf install -y sshpass
# or: sudo yum install -y sshpass

Check it is installed:

which sshpass
sshpass -V

Then in Admin → Backup:

1. Leave private key empty (or clear it if you are switching methods)

2. Enter SSH password

3. Save backup settings

4. Test connection

Prefer a private key for production. Passwords are easier to mistype, rotate awkwardly, and depend on sshpass staying installed after server rebuilds.

---

Schedule, retention, and the Backup mod switch

Setting Meaning
Backup mod Master switch for scheduled backups. When off, the clock does not run. You can still use Run now after SSH is saved
Backup schedule period Off, Hourly, Daily, or Monthly (server time / UTC as shown on the page)
Backup retention mode Keep N backups (timestamped folders) or Overwrite latest (keeps a current folder)
Keep at most How many remote sets to keep when using count mode (for example 5)

Typical first setup

1. Unlock the plugin

2. Turn Backup database on (and website files if you want)

3. Fill SSH host, port, path, username

4. Add private key (or password + sshpass)

5. SaveTest connection

6. Click Run now and watch Run history

7. Confirm files appeared on the remote server under your path

8. Turn Backup mod on and choose Daily (or Hourly / Monthly)

9. Save again

Pre-flight checks

The Backup page shows Pre-flight status. Fix anything red before relying on the schedule — common needs:

  • pg_dump installed (PostgreSQL client tools) if you back up the database
  • rsync and ssh available on the main server
  • Database connection configured
  • Enough free disk for temporary staging
  • Complete SSH settings + auth

---

Where files land on the remote server

Under your Remote backup path, XFile Ultra creates folders such as:

  • Database dumps under a database/ folder (timestamped, or current/ in overwrite mode)
  • Website files under a website/ folder the same way

Clear history on the Backup page only clears the run list in admin — it does not delete remote backup files.

---

Common problems

“Premium plugin required”

Buy Backup on xfileultra.com and refresh the license under Site identity.

Test connection fails

Wrong host/port/user, path not absolute, firewall blocking SSH, or public key not in authorized_keys. Retry with a normal SSH login from the main server:

ssh -p 22 USER@BACKUP-HOST

Password auth error mentioning sshpass

Install sshpass on the main server, or switch to a private key.

Schedule never runs

Backup mod off, period set to Off, SSH not saved, or Test connection still failing.

Database backup fails

Install PostgreSQL client tools so pg_dump exists on the main server (package name is often postgresql-client).

Restored the app but uploads are missing

Expected — website backup does not include member upload storage. Back those up separately.

---

Related