You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aiden Holmes 37e25b7672
add cron instructions
1 day ago
.gitignore ignore *.pyc 1 year ago
LICENSE update license 6 months ago
README.md add cron instructions 1 day ago
backr.py add --no-comment option 1 day ago
logo.png add logo file 1 year ago
restor.py test possible_backups before printing without try/except 3 days ago

README.md

backy-py

a simple backup tool

logo

Features

  • Store different backups in different locations

  • Backup a folder and one or more of its subfolders separately

  • Delete old backups to save space without affecting more recent ones

Installation

git clone https://github.com/aidenholmes/backr-py

cd backr-py

put backr.py and restor.py in PATH, eg:

ln -s ~/backr-py/backr.py ~/.local/bin

ln -s ~/backr-py/restor.py ~/.local/bin

Usage

cd /foo/bar

backr.py # to backup

restor.py # to restore

Removal

Remove backr.py and restor.py from PATH then delete the repository eg:

rm ~/.local/bin/backr.py

rm ~/.local/bin/restor.py

rm -rf ~/backr-py/

Scheduling Backups with Cron

  1. Backup directory manually to set backr location
cd /foo/bar

backr.py
  1. Add command with crontab -e
# add this to crontab:

@reboot cd /foo/bar; /home/user/.local/bin/backr.py -n -w
  1. Change @reboot to your desired schedule

  2. Change /home/user/.local/bin/backr.py to your backr.py path

  3. Change -n to -c if you want to use compression