# Move hostware environment

Below you will find a description of how the hostware VM can be moved to another VM.

### Set up a new server

Install a fresh hostware environment on the new server using our installer script.

### Move database

The "hostware" database must be moved from the old to the new server. This can be done using mysqldump, for example.

**Export:**\
mysqldump -u root -p hostware > hostware\_backup.sql

**Import:**\
mysql -uroot -p -f hostware < hostware\_backup.sql

### Move .env

It is important that the .env file is moved from the hostware directory (/var/www/hostware) to the new server.

### Moving other files

Other files such as favicons or individual modules in the /custom/modules or /custom/themes directory must also be moved. The /storage/app/ directory should also be moved if it is not empty.

### Empty caches

All caches can then be emptied with the following command:

```shellscript
cd /var/www/hostware
php artisan cache:clear
php artisan config:clear
php artisan route:clear
```
