- Data encryption
- Data deduplication
- Incremental backup
- Prunning older versions
- External drive backup
- Cloud backup
- 3-2-1
You will need
Copy configuration:
mv _config_sample.sh _config.sh
sudo borg init --encryption=repokey /home/mik/vm/borg.archive/
Put these in the config:
# borg folder name
export BORG_FOLDER_NAME='2018_desktop_borg';
# directory where to put Borg backup repo.
export BORG_DESKTOP="/home/mik/vm/$BORG_FOLDER_NAME";
Set in the config:
export BACKBLAZE_PATH="backblaze:mik-desktop-borg-bucket-for-backup"
export WASABI_PATH="wasabi:dekstop_borg"
Add label to the external drive
sudo e2label /dev/sdc1 backup_drive
Ensure that your REMOTE_DIR
exists and is empty.
Put in the config
# place where external HDD should be mounted (for script: to_external_hdd.sh)
export REMOTE_DIR="/home/mik/otherfs";
# label of the backup drive
export BACKUP_DRIVE_LABEL="backup_drive";
# name of the directory on the remote media
export REMOTE_PATH="$REMOTE_DIR/$BORG_FOLDER_NAME";
Plug in external drive and execute ./to_external_hdd.sh
Execute ./to_internal_folder.sh
to put data into a folder specified in BORG_DESKTOP
variable in the config.
This step is important to backup later to the cloud.
Variables that must be set for this step are:
# pass phrase for borg backup
export BORG_PASSPHRASE='Your Pass Phrase Here';
# borg folder name
export BORG_FOLDER_NAME='2018_desktop_borg';
# directory where to put Borg backup repo.
# (Keep in mind, it might require a lot of space, as a rule of thumb, 1/3 of entire backup amount should be enough)
export BORG_DESKTOP="/home/mik/vm/$BORG_FOLDER_NAME";
export BORG_EXCLUDEFILE="_ignore";
You must install endpoits with rclone config
prior to this
step. Check https://rclone.org/ for documentation
Execute either of to_cloud_backblaze.sh
or to_cloud_wasabi.sh
You will need additionally to set:
export BACKBLAZE_PATH="backblaze:mik-desktop-borg-bucket-for-backup"
export WASABI_PATH="wasabi:dekstop_borg"
And you will need already functioning backup to the internal folder that RClone will sync to the preferable cloud
In practice, both of these commands should be executed consequently. I.e:
to_internal_folder.sh && to_cloud_backblaze.sh
Set up which folders to ignore in backup _ignore
For example:
/proc/*
/boot/*
/cdrom/*
/dev/*
/media/*
/mnt/*
/run/*
/selinux/*
/tmp/*
/var/log/*
/sys/*
/var/*
/var/tmp/*
/var/lib/docker/*
/var/cache/*
/lib/*
In case you are planning to backup the entire drive, you will need to do everything by the root user, including setting up RClone endpoints, and Borg repository
The MIT license