How to restore a site

Discover our Public Cloud offer

Shared Hosting for Everyone, imagined by developers, for developers.

Discovering the Public Cloud

Backups of your files and databases are located in the $HOME/admin/backup directory for your account. You can restore them using the Advanced > Restore backups menu.

  1. Choose the required date,

    Administration interface: restore backups - step 1
    Administration interface: restore backups - step 1

  2. Then check the one or more databases and/or directories required 1.

    Administration interface: restore backups - step 2
    Administration interface: restore backups - step 2

Restore will overwrite the current configuration, so make a backup first.

The restore time depends on the size of the files to restore.

SSH mode

To restore a backup manually.

  • Connect to your account in SSH ;

  • Restore files:

    $ rsync -av --delete $HOME/admin/backup/[date]/files/[directory]/ $HOME/[directory]/
    

Be aware that --delete will delete all of the files from this directory that have been created since the backup date. To run a test add -n.

  • Restore a MySQL database:

    $ xzcat $HOME/admin/backup/[date]/mysql/[base].sql.xz | mysql -h mysql-[account].alwaysdata.net -u [user] -p [base]
    
  • Restore a PostgreSQL database:

    $ xzcat $HOME/admin/backup/[date]/postgresql/[base].sql.xz | psql -h postgresql-[account].alwaysdata.net -U [user] -W -d [base]
    
  • Restore a MongoDB database:

    $ xzcat $HOME/admin/backup/[date]/mongodb/[base].xz | mongorestore -h mongodb-[account].alwaysdata.net -u [user] -p -d [base]
    

  1. It is not mandatory to restore both databases and files. ↩︎