Restore a Linux File Backup

Published on June 10th, 2020

SimpleBackups founder

Islam Essam

Co-founder, SimpleBackups

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

Don't want to maintain backup scripts?

Unlock no-code & optimized backup, for all your projects.

Try SimpleBackups

No credit card required. Free 7-day trial.