Raspberry pi backup using Rsync server and OpenVPN

1. Server setup

1.1 Initial setup

Initial steps :
OpenVPN server
OpenVPN client
Rsync server

Then we are ready for this step !

1.2 Directories

Create folders for our daily backups for “bart” :

Create folders for our weekly backups for “bart” :

Adjust permissions :

The server is ready !

2. Client setup

Once the Rsync server is up and running, let’s see how we could backup essential files from our Pi called “bart”.

2.1 Files selection

First, let’s create a file that lists all the files that we want to backup :

In our exemple, here are the files that we’ll backup :

2.2 Test

Daily backup test:
Test the daily backup using the ISO day number :

The output should looks like this :

Weekly backup test:
Test the weekly backup using the week number :

The output should looks like this :

The files should be on the server !

2.3 CRON

Edit the cron table :

And add the following lines :

You’re done. The backup monitoring will be done on the server side, using Zabbix.

Leave a Reply

Your email address will not be published. Required fields are marked *