Restore a Linux File Backup

This tutorial explains how you can restore a linux file backup of, for example the /var/www directory on your server.

Step 1

Assuming you have a link of the tar archive you want to restore for /var/www.

Step 2 (optional)

If you are using SimpleBackups, you can go to your backup page, under the "Backup History" section click the little "i" on the right, then click "Raw Download Link" and copy the output.

SimpleBackups File Restore

Step 3

On your server, run the following command, replace the raw download link you obtained in the previous step:

wget "TarBackupLinkHereBetweenTheQuotes" -O "backup.tar.gz"

Step 4

Now that you downloaded the backup on your server, restore it as shown below by running:

tar --overwrite -xvf backup.tar.gz --directory / var/www

this will overwrite your /var/www directory by the one in the backup archive. It is a good practice to extract the backup in a temp folder first and inspect it.

â­ Back to blog

Ready to automate your backups?

Sign up for FREE. Get started in less than one minute.

Secure your backups

No credit card required. Free 14-day trial.