Restore from Backup File



This command is intended for official Snipe-IT generated backups ONLY. If you are trying to restore from a manually generated database and filesystem backups (using PHPMyAdmin, mysqldump, etc), this command will not work unless you recreate the structure of the zip file that Snipe-IT generates.

If you have a previously generated Snipe-IT backup file that you'd like to restore back to (for example, if you did a backup right before a big LDAP sync, and you realized the sync wasn't configured correctly and you need to roll that back), you can use the command-line utility to restore it to a known good state:

php artisan snipeit:restore /full/path/to/your/

There are a few additional optional parameters you can also use:

php artisan snipeit:restore /full/path/to/your/ --force

This will force the restore without asking you to confirm by typing Yes after the prompt.

php artisan snipeit:restore /full/path/to/your/ --no-progress

This will hide the progress bar in the terminal.

Afterwards, run:

php artisan migrate

Assembling a Snipe-IT Compatible Backup File

If for some reason you can't get the Snipe-IT-generated backup to work (and for example have to do a manual database dump, etc), the file structure Snipe-IT is expecting in the .zip file you can assemble it yourself:

  • SQL file should be at the top level. It can be named anything, but must end in .sql and there must only be done.
  • You should have a public/uploads directory (with subdirectories) and a storage/private_uploads directory (with subdirectories).
  • Anything else in the zip file will be skipped.
1220 1212