Websites and their code change all the time, creating a backup of your site will allow you to revert to an earlier version if it gets hacked, or if an update, change of code, or removal of files were to go wrong. Servebolt runs full nightly backups of your sites, but being able to revert to an earlier version of your site yourself is crucial to guarantee a restore of the version of your site you want in your desired timeframe.
In this article, we’ll cover how you can backup the files of your website with the use of SSH and SFTP.
SSH: How to backup your files
Here is how to create a backup of your files in just a few minutes. Login to the site you want to backup using your SSH user.
With the command below we’ll create an archive of all your files, like this:
cd && tar -czf private/backupfiles.tgz public
This will create a file named backupfiles.tgz
in the /private
folder of your site. It is a compressed archive, to save disk space. Note that this may take some time depending on the size of all files. The backup will also use disk space on the Bolt you are running a backup on, so be sure that you have enough disk space to create a backup. For more information on how you can check your disk usage, check out this article.
How to restore your backed-up files (optional)
If you followed the previous step in backing up your files, then restoring the previously backed-up files can be done with this command:
cd && tar -xzf private/backupfiles.tgz public
SFTP: How to backup your files
In this method, you’ll connect to your site hosted by Servebolt via SFTP using FileZilla and download a copy of your files to your local machine.
- Open FileZilla and login with your SFTP credentials.
- Download files to your local machine
When you are successfully connected to your site using FileZilla you will have a section on the right-hand side called “Remote site:”. This is where you will see the files of your website hosted by Servebolt.
On your left-hand side, you’ll find a section called “Local site:”, this is where you’ll see the folder(s) of your local machine.
Navigate to the folder or file you want to download/backup from the “Remote site:” section and drag and drop them over to your left-hand side over to your local machine to begin downloading your files. Alternatively, you can right-click the folder(s) or file(s) that you want to download and click “Download”. Wait for your files to download, then you are done.
How to restore your backed-up files (optional)

When you try to upload a file that already exists in a remote location, then you will get some options. The default action in FileZilla is “overwrite” and will write on top of the file that is already uploaded. This means that the file you are uploading to the remote location will overwrite the already existing file. If that is what you want, then click the “OK” button and wait for your file to be uploaded.
