How to backup – Restore Vestacp User

How to backup – Restore Vestacp User

By default, vestacp will always do backups every day by the number of backup files 3 days back. But sometimes we need the last backup (backup current condition) for any reason, for example when going to perform a software upgrade or when going to migrate to another VPS.

How to backup Vestacp user

To backup user on vestacp, you can do trough this command line:

v-backup-user yourVestacpUsername

And the result like this:

-- SYSTEM --
2016-02-08 18:47:00 yourVestacpUsername.conf
2016-02-08 18:47:00 stats.log
2016-02-08 18:47:00 history.log
2016-02-08 18:47:00 pam

-- WEB --
2016-02-08 18:47:00 yourdomain1.com
2016-02-08 18:47:10 yourdomain2.com
2016-02-08 18:47:20 *** 2 domain ***

-- DNS --
2016-02-08 18:47:20 yourdomain1.com
2016-02-08 18:47:20 yourdomain2.com
2016-02-08 18:47:20 *** 2 domain ***

-- MAIL --
2016-02-08 18:47:20 yourdomain1.com
2016-02-08 18:47:20 + [email protected]
2016-02-08 18:47:25 + [email protected]
2016-02-08 18:47:25 yourdomain2.com
2016-02-08 18:47:25 + [email protected]
2016-02-08 18:47:40 + [email protected]
2016-02-08 18:47:40 + [email protected]
2016-02-08 18:48:04 *** 2 domain ***

-- DB --
2016-02-08 18:48:04 yourVestacpUsername_dbname1 (mysql)
2016-02-08 18:48:06 yourVestacpUsername_dbname2 (mysql)
2016-02-08 18:48:06 *** 2 databases ***

-- CRON --
2016-02-08 18:48:06 *** 5 jobs ***

-- User Dir --
2016-02-08 18:48:06 adding directory public_html
2016-02-08 18:48:07 adding directory tmp
2016-02-08 18:48:07 *** 2 directories ***

-- SUMMARY --
2016-02-08 18:48:07 Local: /home/backup/yourVestacpUsername.2016-02-08.tar
2016-02-08 18:48:07 Size: 234 Mb
2016-02-08 18:48:07 Runtime: 1 minute

In the bottom row (SUMMARY), you will see the backup file name from the backup process above is /home/backup/yourVestacpUsername.2016-02-08.tar

How to Restore backup in Vestacp

to restore Backup file in vestacp, you can use this command:

v-restore-user yourVestacpUsername BackupFileName
About the Author

2 thoughts on “How to backup – Restore Vestacp User

  1. rxbot.us - October 2, 2017 at 3:53 am

    Hi, When I use command v-restore-user the result is > -bash: v-restore-user: command not found

    why and how to resolve this matter?

    Reply
    • Admin Bestariweb - October 20, 2017 at 11:11 am

      You can use command with full path:

      /usr/local/vesta/bin/v-restore-user username backupfilename
      
      Reply

Leave a Reply