Dputils is a set of tools and utilities for working with helpdesk instances. Available in both Linux and Windows environments, commands and flags are common to the both. If you want the Linux version, please follow the guide Migration Tool (Linux)
Every single copy of Deskpro already ships with the latest version of dputils, but if you prefer to dowload the latest version you can download it from the GitHub Releases and move it to the deskpro\bin folder.
In a Windows environment you have to either invoque php.exe using its full path or have it as a system environment variable. We will use the full path for convenience.
Run dputils with the --help flag to display the help menu
C:\> cd c:\DeskPRO\DeskPRO\
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe bin/console dputils --help copy

1- Backup
1.1 Full Backup
To generate a full backup of a current Deskpro instance, you just need to run the command with the -t flag specifying the folder where the backup will be stored:
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe bin/console dputils backup -t /path/to/backupdestination copy

If you prefer to generate the backup in a public directory, you can use the target "public". This will give you a long random URL that you can use to expose the download to the internet. This can be useful if you want an easy way to get this backup to another person or server. Just remember to delete the file after it's been downloaded!
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe bin/console dputils backup -t public
..
Your backup is available at http://your-deskpro-url/assets/deskpro-backup.2019-05-13_16-17-53.zip copy

1.2 Database Backup
You can also opt to generate a backup with only the database. For that use the -b database
flag:
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe dputils backup -b database -t /path/to/backupdestination copy

1.3 Attachments Backup
If you prefer to generate a backup containing only the attachments folder, you have to use the flag -b attachments
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe dputils backup -b attachments -t /path/to/backupdestination copy

2- Restore
The restore command has several options available that will suit pretty much all clients needs
2.1 Local Restore
This will restore the full backup (database and attachments) from the local filesystem
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe dputils restore -k /path/to/deskprobackup/deskpro-backup.2019-05-13_16-15-55.zip copy

2.2 Direct db connection
This option requires that the source mysql server can be accessed. Modifying my.cnf to open it to network connections will allow it. This is done by changing the bind_address and setting it to 0.0.0.0 should do the it.
C:\DeskPRO\DeskPRO> c:\DeskPRO\PHP\php.exe dputils restore --mysql-direct string deskpro:mypass@10.1.1.3/deskpro copy
The complete dputils command and flag manual can be found in our Reference
请登录或注册以提交评论。