How to setup backup

You can use various tools for backup. Here's how to using backup service Snapbackuper that is ransomware resistant .

Requirements

Each admin can install the components, just install the standard common components for remote data copying. You don't have to give other people access to your server. All Linux distributions, BSD, Mac OS and MS windows and more are supported. Login to the service is using keys.

SSH keys

Generate an ssh key and send the public part so that you can verify yourself as an authorized user to the service.

Instalation

You run the backup yourself. It is ideal to use a tool rsync, it is open source software, has open source code and is completely free. It is available for GNU / Linux, Mac OS, windows and more. This allows you to back up with it linux servers and desktops with MS Windows. sudo apt-get -y install rsync

Backup

Choose what data you need to back up. Backup is easy and fast. You can initialize the backup and perform a regular backup with one command:

 rsync  -av -e   "ssh -p $PORT -l $USER" --delete  \
/home example.snapbackuper.com:~/backupdir  \
--exclude temp --exclude Downloads
                

For regular backups, run the command at regular intervals, for example using cron .

As soon as you create a backup.snapbackuper file in the backup, in the backup, The service make the backup archived and remains read-only in the given state. To create the given file, use the command:

ssh -p $PORT $USER@$IP "> /home/backuper/BACKUP/DIR/backup.snapbackuper"

List of backups

Listing all backups is easy, just log in to the backup system using a special account and list all files. Individual backups are represented as directories.

ssh -p 40003 backuper@example.snapbackuper.com "ls BACKUP/"

Recovery

You can restore data by simply copying data from a specific time version of the backup:
# scp  -p 40003 -arf \
backuper@example.snapbackuper.com:/home/backuper/BACKUP/DIR/DIR-2021-04-08_10:15~
/home/recover

Or by copying using rsync:

rsync -av --delete --delete-excluded  -e   "ssh -p $PORT -l $USER"  $IP:$BackupDir/ /recover/

Ready-made backup script

You can use an existing script to use backup: github project backup script.