Appearance
Backups & moving servers
A Replora installation is the database, the recordings, the .env file and a few files in storage/. Back those up regularly and you can restore the site, or move it to another server, in a few minutes. Everything else can be downloaded again.
What to back up
| What | Where | Why |
|---|---|---|
| The database | PostgreSQL | Accounts, websites, sessions, every report, settings changed in the dashboard, plans and subscriptions (SaaS) |
.env | Application folder | The database password and APP_KEY: without the same key, saved secrets (SMTP password, API keys, payment keys) can't be read |
| Recordings | storage/app/recordings (local driver) or your bucket | The recorded events: without them sessions are listed but can't be replayed |
| Private files | storage/app/private | Uploaded logo and favicon, ticket attachments, website page documents, payout proofs (the location databases in storage/app/geoip are downloaded again weekly) |
| License file | storage/app/replora-license.json | The verified purchase code; updates use it to fetch new modules |
| Installed marker | storage/app/replora-installed.json | Closes the installer; without it a restored copy would open the installer again (it also holds the purchase code) |
| Your own modules | Folders you added to modules/ or saas/modules/ | They are not part of any package |
You don't need to back up vendor/, public/build/, the Replora modules (re-download them with php artisan replora:core), storage/framework/, storage/logs/ or the update backups in storage/app/updates.
Simplest rule
Back up the database and the whole storage/ folder plus .env. That covers everything on the list except your own modules.
Back up the database
bash
pg_dump -Fc -h 127.0.0.1 -U replora replora > replora-$(date +%F).dump-Fc writes PostgreSQL's compressed custom format, restored with pg_restore. The dump is consistent while the site keeps running. To avoid typing the password, put it in ~/.pgpass (127.0.0.1:5432:replora:replora:a-long-password, mode 600).
On shared hosting, use the control panel's backup (cPanel: Backup › Download a PostgreSQL Database Backup) or phpPgAdmin's export.
A nightly backup script
bash
#!/usr/bin/env bash
# /usr/local/bin/replora-backup: database, .env and storage/ (without caches, logs and update backups)
set -euo pipefail
APP=/var/www/replora
OUT=/var/backups/replora
mkdir -p "$OUT"
STAMP=$(date +%F)
pg_dump -Fc -h 127.0.0.1 -U replora replora > "$OUT/db-$STAMP.dump"
tar czf "$OUT/files-$STAMP.tgz" -C "$APP" .env \
--exclude=storage/framework --exclude=storage/logs --exclude=storage/app/updates storage
# keep 14 days
find "$OUT" -type f -mtime +14 -deletebash
sudo chmod +x /usr/local/bin/replora-backup
echo "30 2 * * * root /usr/local/bin/replora-backup" | sudo tee /etc/cron.d/replora-backupIt runs at 02:30, before recordings are pruned at 03:00. Copy /var/backups/replora to another machine or to object storage (rclone, restic, borg): a backup on the same disk doesn't survive a disk failure.
Recordings in a bucket
With RECORDINGS_DRIVER=s3 the recordings are not on the server. Turn on versioning (S3, MinIO) or make a regular copy into a second bucket (rclone sync r2:replora-recordings backup:replora-recordings). Recordings are deleted every night after their retention period, so a copy only needs to keep what is still within it.
Restore
- Put the application files in place: unpack the same version's package, or your file backup.
- Restore
.envandstorage/from the backup into the application folder. - Restore the database into an empty database:
bash
sudo -u postgres psql -c "CREATE DATABASE replora OWNER replora;" # if it doesn't exist
pg_restore --clean --if-exists --no-owner -h 127.0.0.1 -U replora -d replora db-2026-11-20.dump- Fix the owner and permissions, and fetch the modules if
modules/is incomplete:
bash
cd /var/www/replora
sudo chown -R www-data:www-data .
sudo -u www-data php artisan replora:core
sudo -u www-data php artisan config:clear
sudo -u www-data php artisan queue:restart- Open Administration › System and click Check now: every service should work.
If the backup is from an older version than the files you restored, finish the update afterwards (Finish the update or php artisan replora:upgrade). Files older than the database refuse to run an update: restore files of the same version or newer.
Move to another server
Keep the same domain if you can: every website's snippet points at it, and the license is attached to it.
- Prepare the new server as in Install on a VPS: packages, PostgreSQL user and an empty database, Nginx. Don't run the installer.
- Copy the files: the whole application folder (or a fresh package of the same version plus
.env,storage/and your own modules). - Copy the database: dump it on the old server and restore it on the new one, as above. Change
DB_HOST,DB_DATABASE,DB_USERNAME,DB_PASSWORDin.envif they differ. - Recordings: on the local driver they came with
storage/; with a bucket nothing moves. - Permissions, modules, caches:
chown,replora:core,config:clearas in Restore. - Background services: the Supervisor or systemd worker and the cron line on the new server.
- Switch DNS to the new server, then get the certificate there (
certbot --nginx -d analytics.example.com). - Catch up: the old server keeps receiving recordings until DNS has switched everywhere. For a clean cut, copy the recordings written in the meantime again (
rsync -a old:/var/www/replora/storage/app/recordings/ /var/www/replora/storage/app/recordings/); sessions in the old database from those hours are lost unless you dump the database again at the very end. - Check:
php artisan replora:doctorand the System page; stop the worker and cron on the old server.
Moving to a new domain
- The license is attached to the old domain: contact our support with your purchase code to move it, or updates stop with This purchase code is already used on ….
- Change
APP_URLandSANCTUM_STATEFUL_DOMAINSin.env, thenphp artisan config:clear. - Every website's snippet contains the old address (
https://old.example.com/t.js): replace the snippets on all recorded websites. Replora answers only on the host ofAPP_URL(and its subdomains), so the old domain can't simply be added as an alias in Nginx; keep the old installation running until every snippet is replaced.
