Sysadmin Guide

Migration Tool (dputils)


Deskpro comes with a helper tool called dputils that can help automate some or all of the tasks involved with migrating your helpdesk to a new server.

The dputils tool is quite powerful and can be used in a variety of ways. To read more about all the options, refer to the reference: Reference

Obtaining dputils

Most Deskpro instance comes with dputils. You can use it via the console from within the Deskpro directory:

# Example on Linux
cd path/to/deskpro
bin/console dputils --help

# Example on Windows
cd c:\DeskPRO\DeskPRO
"C:\Program Files\PHP\7.0\bin\php.exe" bin\console dputils --help

Download dputils

If you're using an older version of Deskpro, then dputils might not be included, or it might be old. You can always get the latest version of dputils from Github:

https://github.com/deskpro/dputils/releases

  • Download the latest file for the platform you plan to run the tool on. For example, even though you might run Windows, if Deskpro itself is running on Linux, then you need to download the Linux version.
  • Upload the single binary file to your server. It does not matter where you put it.

When the binary file is uploaded to your server, you can use it directly instead of using bin/console dputils:

# Example -- using Deskpro's bundled version on Linux
cd path/to/deskpro
bin/console dputils --help

# Example -- download latest dputils to home dir
wget https://github.com/deskpro/dputils/releases/download/v20190509092925/dputils_linux_amd64 -O ~/my_dputils

# Example -- run dputils that was saved to home dir
cd path/to/deskpro
~/my_dputils --help

General Usage

The process of migrating Deskpro instances is simply: a) Have a new server ready, b) Make a copy/backup of your existing instance, c) Copy that data to the new server and activate it.

This guide will take you through the process using the dputils tool. The tool has many different options that can be used to satisfy many different scenarios. For advanced usage, see: Reference.

If you manually downloaded dputils from Github, remember to change the commands below to use the version you downloaded. Below we will demonstrate using bin/console dputils which is always the bundled version, so change the path accordingly.

1. Create a backup from the old server

The first step is to create what we call a "full backup". This is a backup that contains a database dump as well as all files that exist on the filesystem.

# Example Linux
$ bin/console dputils backup -t public

# Example Windows
$ "C:\Program Files\PHP\7.0\bin\php.exe" bin\console dputils backup -t public

The parameter after the -t is the target -- where you want the backup to be written to. The special public target makes the system write the backup to the current Deskpro public directory with a long, random URL. If the current Deskpro is online or has a URL, then this makes the backup easy to obtain because you can just download it from the URL. If you don't want the backup to be written to the public directory, simply provide a full path instead.

If you use the -t public target -- ensure you delete the file as soon as you've downloaded it to your other server! The public target is public and anyone with the URL will be able to download it. The long random URL makes it impossible to guess, but there are lots of ways the URL might leak out given time (e.g. an email chain, a link in an instant message, an anti-virus that intercepts your links to scan them, company firewall might log URLs, etc).

2. Set up your new server

Get Deskpro installed on a new server using any of the ways described in this guide. You can install it manually, use our VMs, our automatic install script, etc.

After you have installed Deskpro, run the 'clean' command. This erases the default demo installation that you don't need and prepares the server to accept your existing data.

cd path/to/deskpro
bin/console install:clean --keep-config

3. Restore on the new server

On your new server, run the restore command:

# Example Linux
cd path/to/deskpro
bin/console dputils restore --full-backup http://my-deskpro.example.com/assets/deskpro-backup.XXXXXX.zip

# Example Windows
cd c:\DeskPRO\DeskPRO
"C:\Program Files\PHP\7.0\bin\php.exe" bin\console dputils --full-backup http://my-deskpro.example.com/assets/deskpro-backup.XXXXXX.zip

# Example using a local path
bin/console dputils restore --full-backup /tmp/deskpro-backup.XXXXXX.zip

The system will ask you where it should get the data to restore. For example, if you used the public tart (-t public) with the backup command above, then you can simply copy and paste the public URL when prompted.

If you saved the backup somewhere else, you will need to upload it to the server somewhere so the restore utility can use it.

Comments (0)

Add a comment

Add a comment

You need to log in before you can submit a comment.

Need a password reminder?