# How to restore VitalPBX backup from command line?

**URL:** https://forums.vitalpbx.org/t/how-to-restore-vitalpbx-backup-from-command-line/1353
**Category:** FAQ
**Created:** [May 19, 2022, 6:21pm UTC](https://forums.vitalpbx.org/t/how-to-restore-vitalpbx-backup-from-command-line/1353 "2022-05-19T18:21:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![miguel](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/miguel/32/415_2.png) [@miguel](https://forums.vitalpbx.org/u/miguel)
#### Post date: [May 19, 2022, 6:21pm UTC](https://forums.vitalpbx.org/t/how-to-restore-vitalpbx-backup-from-command-line/1353/1 "2022-05-19T18:21:34Z")

</div>

Sometimes, because of the backup size, we are unable to restore it using the VitalPBX GUI; this happens because the server comes configured to support files no larger than 500 M.

So, what can we do when this happens? Well, we have two options.

The first option is to edit the file “_ **/etc/php.d/vpbx.ini** _” to increase the PHP upload size. The parameters to update are the “post\_max\_size” and “upload\_max\_filesize” respectively.

```bash
...
post_max_size = 500M
upload_max_filesize = 500M
...
default_socket_timeout = 600

```

After updating the values and saving the file, we have to reload the Apache service.

```auto
systemctl reload-or-restart httpd

```

Our second and the recommended option is to upload the backup to our new server using an SFTP Client(WinSCP, Filezilla, etc.). Let’s say we upload the file to the path “_ **/tmp/** _” of our new server. Now, how can we restore the file? Well, we need to run a VitalPBX command as shown below.

```auto
vitalpbx --restore-backup "/tmp/my-backup.tar.gz"

```

Keep in mind that you have to pass to the command as an argument the full path of the backup file.

_ **I hope this helps someone out there!** _
