Skip to content

Script for backing up snapper snapshots

Notifications You must be signed in to change notification settings

pavinjosdev/baksnapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Baksnapper - backup script for snapper

Baksnapper is a script for backing up snapshots created by the program snapper using btrfs send and receive. This is a lite-version with many of the extra fluff removed.

Installation

Run as root:

git clone https://github.com/pavinjosdev/baksnapper.git
cd baksnapper
cp baksnapper.sh /usr/bin/baksnapper
cp baksnapperd.sh /usr/bin/baksnapperd
mkdir -p /etc/baksnapper
cp config/* /etc/baksnapper

Initial backup

baksnapper --configfile /etc/baksnapper/root.bsconf
baksnapper --configfile /etc/baksnapper/home.bsconf

Setup crontab

Create file /etc/cron.d/baksnapper with the following contents:

0 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/root.bsconf
1 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/home.bsconf
2 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/var.bsconf
3 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/opt.bsconf
4 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/srv.bsconf
5 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/root-user.bsconf
6 * * * * root /usr/bin/baksnapper --configfile /etc/baksnapper/usr-local.bsconf

Secure cron file:

chmod 600 /etc/cron.d/baksnapper

About

Script for backing up snapper snapshots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%