Skip to content

catch-404/backup-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Bash Backup Script

This repository contains a simple backup script written in Bash. The goal of this script is to perform file/system backups with a basic rotation and retention policy. Note that this is a Work-In-Progress (WIP) and only intended for personal use.

The script creates the backup by making a compressed archive (using tar with gz compression) on the destination. For maximum efficiency, it then makes extensive use of hardlinks to organize the archives in different subfolders on the destination. This ensures 0 unnecessary storage waste and processing.

Usage

Populate the .env file with environment variables.

The script will automatically create the directory structure in the destination for rotations.

Schedule the script to run at your preferred interval with for e.g. cron.

Scope and limitations

This script creates full backups, not incremental backups. It works by creating a full archive of a given source directory and copying it to the destination. Therefore, every new archive it creates is an entire, full backup.

As such, this script is better suited for relatively small amounts of data that you want to backup entirely everytime. Since any and all resulting archives are full backups of the source, any and all of them can be used individually to completely restore the source directory if needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages