Home | Published: Feb 17, 2025

Backing Up Files (with rsync)

This guide is unfinished. The content is present but the detail is sparse.

Prerequisites

You are expected to have the following set up already

Introduction

Having backups of data gives a lot of peace of mind. Using rsync and cron, you can schedule your computer to periodically backup important files to the server.

All you need is to create a script, say backup.sh or the likes, which syncs your information to the server at a set time everyday For example.

backup.sh
rsync -Partz ~/Pictures user@example.com:bkp/Pictures rsync -Partz ~/code user@example.com:bkp/code

The downside is that each backup overwrites each other. This doesn't allow us to go back in time. Maybe a script that copies the backup file on the server before updating it could be good. That way incremental updates still work, and there is a solid history.

A whole system backup would be nice in the future. But this is enough for now.