Backup module · User guide
Back up the whole installation and get it back in an emergency
The Backup module saves your FreeScout installation completely into one file: the database, all uploaded files and the source of every installed module. From that single file the installation can be restored — even onto an empty server on which no FreeScout exists yet.
You find it in FreeScout under Manage → Backup. It needs no other module.

What a backup contains
An archive holds four things:
mysqldump — tickets, customers, settings, everything.storage/app: attachments, profile pictures, logos, vault icons.Modules/, so a restore onto a new server does not need every module procured one by one first.manifest.json records which FreeScout version and which module versions are inside.That the module source travels along is deliberate. Without it you would have to obtain every module on the new server first, in the right version, with the right licence key — at exactly the moment you can least afford it.
FreeScout itself is not in the archive. It is fetched during a restore, in the version the index names.
Scheduled backups
Under Manage → Backup → Settings you set when a backup runs: daily at a fixed time, or weekly on any weekdays, each with its own time.
Keep last N clears the oldest backups by itself. A backup you pin is exempt: it is not counted and never deleted automatically. That is the place for the state before a larger change.
Additionally off-site
Every finished backup can automatically get a copy outside the server: on an FTP or FTPS server or in S3 storage such as Swiss Backup or Amazon S3. You choose one of the two. The copy has its own retention rule — so you can keep three backups locally and thirty off-site.
The point of it: a backup that only sits on the same server as the original helps against a mistake, but not against the machine failing. Test Connection lists the target, writes a small test file, reads it back and deletes it again if the module may delete.
If the upload fails, the local backup stays untouched and valid. Large archives go up to S3 in parts; if the transfer breaks off, the next run carries on with the next part.
Setting up S3
S3 requires an archive password; without one the S3 setting cannot be saved: the archive then sits with a third party, and unencrypted the whole database dump would be there.
| Swiss Backup | Amazon S3 | |
|---|---|---|
| --- | --- | --- |
| Endpoint | https://s3.swiss-backup02.infomaniak.com — the number is your cluster, see the Infomaniak Manager | leave empty |
| Region | us-east-1 | for example eu-central-2 (Zurich) |
| Path style | on | off |
The key needs these permissions on the bucket: list, write, read, abort incomplete uploads — and delete, if the module is to clear away old copies itself.
With the tick Delete old copies in the remote storage the module tidies up according to your retention rule. That has a flip side: whoever takes over your FreeScout installation can delete every copy with the same credentials. Without the tick the module never deletes anything off-site; then you set the retention on the storage itself (lifecycle rule, Object Lock) and give the key no delete permission.
Where the data lives depends on the storage: with Swiss Backup in Switzerland, with Amazon S3 in the region you chose.
No S3 storage yet? Swiss Backup by Infomaniak stores in Switzerland.
Partner link: let's automate receives a commission, at no extra cost to you.
Swiss Backup step by step
This is how you set up Swiss Backup by Infomaniak as remote storage. You need a Swiss Backup account in the Infomaniak Manager.
1. Add a device with S3. In the Manager, open Swiss Backup, go to cloud storage and add a device. Choose S3 as the access method, not the recommended Swift. Only an S3 device gets S3 keys.

2. User. Choose yourself if you manage the backup on your own.

3. Name and storage space. Give the device a name, such as freescout, and assign storage space. As a rule of thumb: the size of one backup times the number under Keep last, plus a reserve. You can assign more space later.

4. Open the connection details. Once the device exists, the connection details button leads to the credentials.

5. Read the credentials — and generate the S3 keys. Three things matter here:
- The endpoint is the address with
s3.in front, i.e.https://s3.swiss-backup02.infomaniak.com. The location field is not the endpoint; withouts3.the storage answers with an error. - The user name
SBI-…belongs to the Swift access and is not an access key. - The S3 keys only come into existence via the link to generate new keys. You get an access key and a secret key. Note the secret key straight away in a safe place.

6. Enter it in FreeScout. Open Manage → Backup → settings, section remote storage, and choose S3.
- As the provider, choose Swiss Backup (Infomaniak). That fills in the endpoint, region
us-east-1and path style. Adjust the number in the endpoint if your cluster has a different one. - Enter a bucket name, such as
freescout, and click the button to create the bucket. Swiss Backup does not create a bucket by itself; the button does it and saves the settings at the same time. - The prefix is an optional folder inside the bucket.
- Enter the access key and the secret key.
- If no archive password is set yet, set one first. Without it, S3 cannot be saved.
Save, then test the connection. From the next backup on, a copy goes to Swiss Backup.

Fetching from the remote storage
If local retention has already deleted a backup, it stays in the list, marked "only in the remote storage". Fetch loads it back onto the server; afterwards it can be validated, downloaded and restored like any other.
Search the remote storage finds archives in the remote storage that are not listed here, for example after a move. Take over adds them to the list.
With S3, Link for kickstart creates a download link, valid for 24 hours. With it, kickstart.php fetches the archive onto a new server by itself.
Validate before you rely on it
The Validate action on a backup does more than look into the file. It unpacks the archive into scratch directories, checks the index, counts the module folders — and if the database user is allowed to, it actually imports the database dump, into its own test database that is dropped again immediately afterwards.
That is the difference between «the file looks intact» and «this backup can be restored». None of it touches your running installation.
Take that step once for the backup you would fall back on in an emergency. An unvalidated backup is a hope, not a backup.
Restoring while FreeScout still runs
This path applies as long as you can still sign in.
- Choose the archive in the overview, or upload one from an older installation.
- Type the exact file name to confirm, or the word
RESTOREfor an uploaded archive. - The module first takes a backup of the current state. That cannot be switched off, and it is the reason a restore that went wrong can itself be undone.
- Then database,
storage/appandModules/are replaced from the archive. The page shows the progress. - Sign in again and check under
Manage→Moduleswhether the versions are the ones you expect — the state from the archive wins over what was on disk.
The typed file name is deliberately inconvenient. A confirmation dialog gets clicked away; a file name does not get typed by accident.
Restoring into an empty hosting account
If FreeScout no longer starts, or you are moving to a new server, you do not need a running installation. The archive and the file kickstart.php, which you download on the Backup page, are enough.
Neither FreeScout nor the modules nor Composer have to be there beforehand.
In order
Prepare an empty web directory and a database. Copy kickstart.php and the archive next to each other into it — over SFTP or SCP, not through the browser: a backup is usually several hundred megabytes and hits the file-size limit in a browser.
If the archive only exists in the remote storage, kickstart.php alone is enough: in the archive step the wizard fetches it from a link or straight from S3 storage.
Then open kickstart.php in a browser. The steps at the top of the page show where you are. (The screenshots show the wizard in German.)
1. Access token. On first load, kickstart writes a file kickstart-token.php next to itself. Open it over SFTP, SSH or your host’s file manager and enter the second line. The token is not on the emergency sheet and is not the archive password. Whoever restores has access to the directory; a passer-by does not.

2. Check. kickstart checks the PHP version, extensions, write permissions, free space, tar, and whether the server may connect to the outside. Once everything says “ok”, carry on.

3. Archive. If the archive lies next to kickstart.php, it appears here with its size, backup time and whether it is encrypted. Otherwise open the section for an archive that is not here yet and choose:
- From a link — such as the
Link for kickstartfrom the Backup page, valid for 24 hours. Then download.

- From S3 storage — the same details as in FreeScout: endpoint, region, bucket, prefix, keys and path style. Listing the archives shows what is in the bucket; pick one and download it. The secret key is only used to list and to sign, and is never stored.

4. Archive password. An encrypted archive asks for the password written on the emergency sheet. Checking the password confirms it before anything is written. kickstart then reads the APP_KEY and the FreeScout version from the archive by itself.

5. FreeScout core. The archive does not contain FreeScout itself. kickstart downloads the matching version from GitHub; leave the version field empty, the version comes from the archive.

6. Database. Enter host, port, database, user and password, and test the connection. If the database already holds tables, kickstart drops them before importing, as long as the box to drop existing tables is ticked.

7. Key. With an encrypted archive the APP_KEY comes from the archive; nothing to enter here. Check the APP_URL: if you are moving to a new address, enter it.

8. Restore. The overview shows everything once more. From the moment you start the restore, things get written: files in the directory are created and overwritten, the database is filled. The log below shows every step.

9. Finish. At the end kickstart lists what is still to be done by hand: point the web server root at public/, set the file owners, bring the database up to the code’s version, add mail and queue settings to .env, and set up the cron again. Then click the button that deletes kickstart.php, the token and the working files. Take that seriously: while kickstart is there, an unpacked database dump lies in the web directory. With the box above it ticked, the archive goes too; a copy stays in the remote storage.

10. Sign in. FreeScout is back, with all tickets, attachments and modules. Sign in as before.

If something seems stuck
A step that takes long is not stuck. The wizard works in short sections and is called again — it remembers how far it got. It is built that way because many hosts limit the runtime of a single request.
If the token file cannot be written, the web server lacks permissions in the directory. That has to be fixed first; a wizard that could run without its proof of access would be worse.
Encrypted archives
If you set an archive password under Manage → Backup → Settings, every further backup is written as a .fsback.enc: the same archive, but fully encrypted with AES-256-GCM.
Because it then protects its own contents, it additionally carries the APP_KEY — the key with which FreeScout encrypts mailbox passwords and credentials in the database. For a restore you then only need the password.
| Without a password | With a password | |
|---|---|---|
Openable with plain tar | yes | no |
Contains the APP_KEY | no | yes |
| A restore needs | the APP_KEY, kept separately | the password |
| A lost secret means | re-entering credentials | no restore at all |
| Protects a stolen archive | no | yes |
The unencrypted form is not the lesser one. It opens with any tar, even without this module — and a lost password cannot make it unusable. Encryption trades that away for protecting an archive that has left the server.
And that is what this is about: a stolen FTP account, a lost hard drive, a wrongly shared folder. It does not protect against your own server, because scheduled backups run without you — so the application has to know the password.
The emergency sheet
Under Manage → Backup → Settings, Emergency sheet produces a print-ready page with the restore steps. It adapts to the form you use:
APP_KEY is printed — because nothing else records it, and paper in a safe beats nowhere.
Keep it where you keep contracts — and not on the same server.
Worth knowing
A restore replaces everything
Database, storage/app and Modules/ are replaced completely by the contents of the archive. Not extended, not merged. Whatever came into being since the backup is gone afterwards — hence the backup of the current state as the first step, and hence the file name you have to type.
Changing the password re-encrypts nothing
Older archives still need the password they were written with, and the module deliberately keeps no list of previous ones. Print a new emergency sheet after a change and keep the old one until the archives encrypted with it have aged out.
What the server has to provide
tar, mysqldump and mysql have to exist on the server — in the usual FreeScout container they do. The off-site copy (FTP and S3) uses cURL and not PHP's FTP extension, which is missing on many servers.
Not getting anywhere with this? Support