What is a Backup Server ?
A backup server is a type of server dedicated to storing backup copies of data and system configurations from other servers or computers. Its primary purpose is to ensure data integrity and availability in case of data loss, corruption, or system failure.
Do I really need a backup server ?
Yes ofc you need a backup server, what would happen if you had only one copy of an important file that got corrupted and you cannot retrieve it anymore ?
Even if your not in IT, having backups of data is really important.
Requirements & Description
- A server (I reccomend using oracle’s free tier servers )
- Rsync (A program that automatically synces files and folders across two different computers)
How to
- First step is to create a server, for this instance I’m using oracle’s free tier servers.
- Second step is to ssh into the server using the ssh keys.
# Change file permissions (Required by ssh)
chmod 600 ssh-key-2024-09-11.key
# Logging into the server using ssh keys
ssh -i ssh-key-2024-09-11.key username@ip_address
- Third step is to update the system and install the software required
# Updating the system
sudo apt update -y
# Upgrading the system
sudo apt upgrade -y
# Installing Rsync program
sudo apt install rsync -y
- Fourth step is to go to your home computer and create a backup folder where you will keep all your important files that are to be uploaded to the backup server.
# Creating the backup folder
mkdir backup
# Adding dummy files
touch first_folder second_folder
- Fifth step is to upload them using rsync, you can either manually upload them or you can create a cronjob that updates your files everyday.
# Manually using rsync
rsync -rvuP -e "ssh -i /path/to/ssh.key" /home/adityaa/backup ubuntu@ip-address:
# automatically uploading files using cronjob
0 9 * * * rsync -rvuP -e "ssh -i /path/to/ssh.key" /home/adityaa/backup ubuntu@ip-address:
Credits
I got this idea from cyberacademy and by watching luke smith’s video on rsync.