A backup is insurance for when nothing else has helped, for example if the server has been hacked, you have accidentally deleted important files or an application update went wrong.
At the moment we do not make server snapshots or backups automatically, so you need to save important data yourself. This is set out in clause 8.4 of the Terms of Service.
Do not keep backups on the server itself
If an attacker gains access to the server, they will delete the backups along with everything else. That is why you should move a backup to your computer or to cloud storage straight away.
1. Pack important data into an archive
The commands are run on the server.
Three folders usually matter.
/etc– system and application settings;/var/www– website files;/home– user data.
# Pack the folders into a single archive. The date in the name
# helps you tell backups apart
sudo tar -czf /tmp/backup-$(date +%F).tar.gz /etc /var/www /home
# Make the archive available to your user so you can download it
sudo chown $USER: /tmp/backup-*.tar.gz
# See what you got and how big the archive is
ls -lh /tmp/backup-*.tar.gzIf one of the folders does not exist on the server, tar will simply warn you about it and pack the rest.
2. Save the database
You cannot simply copy database files while the database is running. It has to be exported with a special command. If there is no database on the server, skip this step.
# Export all databases into one file. The command will ask for
# the database root password
sudo mysqldump --all-databases -u root -p > /tmp/databases-$(date +%F).sql
# Make the file available to your user
sudo chown $USER: /tmp/databases-*.sql# Export all databases as the postgres system user
sudo -u postgres pg_dumpall > /tmp/databases-$(date +%F).sql3. Download the backup to your computer
These commands are run on your own computer. Replace SERVER_IP with the server's IP address and the date with the date from the archive name.
# Download the archive to the current folder on your computer.
# If you have changed the SSH port, add it with -P, for example
# scp -P 2222 ...
scp admin@SERVER_IP:/tmp/backup-2026-10-13.tar.gz .
# Download the database dump the same way, if you have one
scp admin@SERVER_IP:/tmp/databases-2026-10-13.sql .After downloading, delete the copies from the server so they do not take up space.
# On the server, delete the temporary backup files
rm /tmp/backup-*.tar.gz /tmp/databases-*.sqlCheck your backups
A backup is only useful if you can restore from it. From time to time, open the archive and check that the files you need are there.
# List the files in the archive without unpacking anything
tar -tzf backup-2026-10-13.tar.gz | head -50Make backups regularly
A good habit is to make a backup before any major change on the server and at least once a week for working projects.
Our resources
Telegram channel: https://t.me/f3cloud_news
F3 Cloud: https://f3cloud.com