CrushMFT Documentation

Backup and restore#

Everything that makes a CrushMFT server this server, its settings, users, jobs, keys and records, is in one folder: the CrushMFT folder. Backing the server up is backing up that folder. The users' files are a second matter, wherever they are kept.

What to back up#

What Where How often
the CrushMFT folder, all of it where you installed it daily
the users' files wherever the users' folders point: local disks, a file server, cloud storage as their worth demands; cloud storage and file servers have their own means
keystores and key files that lie outside the folder wherever your settings name them with the folder
a database of yours that the server uses, if any the database with the database's own tools

Backing up the whole folder is the simple and safe choice. It is small beside the users' files. If you must choose, these are the parts that cannot be made again:

Part of the folder Is
prefs.XML the settings
users/ the users
jobs/ the jobs
TempAccounts/ the open shares
the SSH host keys, ssh_host_* the server's identity towards SFTP clients
pgp.keystore, and keystores in the folder keys. Without the PGP keys, files encrypted with them are lost for good. The PGP key ring opens only with its password, which is in prefs.XML: keep them in the same backup.
rbac.XML, rbac_job.key the access roles, and the key that jobs are signed with
login_key/, cluster/ keys the server made for itself: for sealed logins, and its identity in a cluster
activity/ the record behind the reports
backup/ the server's own earlier versions of settings, users and jobs

And these can be left out, if room is short: logs/ and CrushMFT.log (unless your rules say logs are records), Preview/ (made again on demand), the program itself (CrushMFT.jar, plugins/, WebInterface/: from the download), and dumps.

What each file and folder is: The files and folders of a server.

Taking the backup#

The server need not be stopped. Its files are small, written whole, and a copy taken while it runs is usable.

Two cautions:

  • The record of activity in activity/ is written all the time. A copy taken while the server runs holds the record up to a moment shortly before the copy.
  • Take the folder in one go, with a tool that copies a consistent picture if you have one: a snapshot of the disk or of the virtual machine is ideal.

Any backup tool will do. The folder has no open database in it that would need special handling.

Keep copies somewhere else than the server's own disk, and keep more than one day.

Warning

The backup holds everything an attacker would want: the users with their password hashes, the server's private keys, the settings with their stored secrets. Protect it as you protect the server. Encrypt it if it leaves your hands.

What the server keeps by itself#

In its folder backup, the server keeps earlier versions of what administrators change. It is a net for mistakes, not a backup: it is on the same disk.

Kept How many Use
the settings, at each save: backup/prefs0.XML and up the last 20 a wrong change in Preferences
each user, at each save: a zip named after the user and the time, under backup/users/ and the connection group 100 saves, unless changed: Keep x backups of users in User Manager in Preferences, Misc a user changed or deleted by mistake
each job, at each save its earlier versions a job changed by mistake. See also Change log.
the PGP key ring, before each change: backup/pgp_…, and its retired keys as backup/pgp_…_deleted a key removed by mistake. The copies made when the server gave the ring its own password end in _before_new_password and open with the old shared password.
earlier versions of the program, at updates: backup/updates/ going back after an update

To put an earlier prefs.XML back: stop the server, copy the wanted prefsN.XML over prefs.XML, start it. The lowest number is the newest.

Restoring#

One thing#

Lost Do
one user copy the user's folder from your backup into users/ and its connection group; or unpack one of the server's own zips of that user from backup/users/ there. The server reads it at the user's next login.
one job copy the job's folder into jobs/
a setting from the server's own backup/prefsN.XML, or from your backup
a user's file from the backup of the users' files. Or from the server's file revisions, if they are on for that folder.

The whole server#

  1. Install the same version of CrushMFT on the new machine: Quick start, without starting it.
  2. Copy the backed-up CrushMFT folder over the new one.
  3. Put keystores and key files that lay outside the folder back where the settings expect them.
  4. Start the server.
  5. Check: Startup notices, a login, the certificate, a job.

The same steps move a server on purpose: Moving a server to another machine.

If you restore a newer backup onto an older program, update the program first. The other way round, an older backup under a newer program, works: the server brings older settings up to date when it starts.

Try it#

A backup that was never restored is a hope. Once, and after every large change:

  1. Take last night's backup to a test machine with no connection to the real network.
  2. Restore as above.
  3. Log in as an administrator and as a user. Look at the jobs.

On the test machine, mind that jobs with schedules would run and alerts would mail: keep it off the network, or disable both first.

In a cluster, and with a DMZ#

  • In a cluster each server has its own folder and its own keys. Back up each. Users, jobs and settings are the same on all; the keys in cluster/ are each server's own and are never copied to another.
  • A DMZ server keeps nothing of yours. Its folder is the program, its start settings and its own key. Reinstalling and pairing it again restores it: Pairing a DMZ.

Things to know#

  • Passwords cannot be read from a backup. They are stored as hashes. Restoring a user restores the password they had.
  • A restored server is the same server: same host keys, same certificate, same identity in a cluster. Never run the original and the restored copy at once on one network.
  • Shares have end dates. A backup from long ago brings back shares that have ended since; the server clears them.

Not tried for this page#

A restore of a whole server was not run for this page. That a copied CrushMFT folder is a working server was seen many times in the making of this wiki, where test servers were copied and started. What the server keeps in backup is read from a test server's folder and the code.