ixesha/README.md

102 lines
2.3 KiB
Markdown
Raw Normal View History

2018-01-21 11:38:52 +00:00
# Ixesha
2018-01-21 11:46:11 +00:00
🗄 Make incremental snapshots to backup any folder to any location/server.
2018-01-21 11:38:52 +00:00
2018-01-21 11:46:11 +00:00
🐍 Written in python.
2018-01-21 11:38:52 +00:00
2018-01-21 13:10:55 +00:00
## Quickstart 💥
```bash
git clone https://github.com/CupCakeArmy/ixesha
python3 ixesha/ixesha --install
rm -rf ixesha
ixesha --backup ~/ --output /mnt/backup/home
```
Whenever you want to do an incremental backup simply rerun the same command:
2018-01-21 11:38:52 +00:00
```bash
2018-01-21 12:52:04 +00:00
ixesha --backup ~/ --output /mnt/backup/home
2018-01-21 11:38:52 +00:00
```
2018-01-21 13:10:55 +00:00
###### How does it work? 🧐
All the snapshots are timestamped and you can delete all the old ones if you like (yes, really 💪), keeping only the last one. The backups are incremental, so they only save the changes you made and are therefore very space efficient. The latest backup is always the `./current` link to the last backup inside of the backup directory.
2018-01-21 12:52:04 +00:00
## Setup
2018-01-21 11:38:52 +00:00
2018-01-21 11:46:11 +00:00
### Requirements
2018-01-21 12:36:53 +00:00
2018-01-21 11:38:52 +00:00
- `Python3`
- `rsync` (min. v3.1.1)
###### macOS
2018-01-21 12:52:04 +00:00
1. Get [Brew](https://brew.sh/): `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
2. Run: `brew install python3 rsync`
2018-01-21 11:38:52 +00:00
###### debian / ubuntu
1. `apt install -y python3 rsync`
###### windows
2018-01-21 11:46:11 +00:00
Well... I don't know...
2018-01-21 11:38:52 +00:00
2018-01-21 12:52:04 +00:00
## Installation 🚂
__Optionally__ you can install/uninstall the script globally. Usefull but __not__ required.
It will be saved to: `/usr/local/bin/`
###### Install
```bash
python3 ixesha --install
```
###### Uninstall
```bash
python3 ixesha --uninstall
```
2018-01-21 11:46:11 +00:00
## Usage 👾
2018-01-21 11:38:52 +00:00
2018-01-21 11:46:11 +00:00
### Run 🚀
2018-01-21 11:38:52 +00:00
2018-01-21 12:52:04 +00:00
Run with: `python3 ixesha` or `./ixesha`
If [installed](#install) simply: `ixesha`
2018-01-21 11:38:52 +00:00
```bash
2018-01-21 12:52:04 +00:00
ixesha --backup <my-folder> --output <where-to-save-it>
2018-01-21 11:38:52 +00:00
```
###### Example
Backup my home folder for example to some mounted drive
2018-01-21 12:36:53 +00:00
2018-01-21 11:38:52 +00:00
```bash
2018-01-21 12:52:04 +00:00
ixesha --backup ~/ --output /mnt/backupdrive/home
2018-01-21 11:38:52 +00:00
```
### Arguments
- `-h` `--help` Show help dialog
2018-01-21 12:52:04 +00:00
- `-b` `--from` `--backup` The folder to be backed up
- `-o` `--to` `--output` Location where the snapshots will be saved
- `-i` `--install` Install the script globally
- `-u` `--uninstall` Uninstall the script globally
2018-01-21 11:38:52 +00:00
2018-01-21 11:46:11 +00:00
### Cron 🕰
2018-01-21 11:38:52 +00:00
If you want to run it every x... you can create a cronjob
###### Example:
Run the script every 5 Min (More details on [cronjobs](http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/))
1. Edit your cron file with: `crontab -e`
2018-01-21 12:52:04 +00:00
2. Add: `*/5 * * * * ixesha -b /some/folder -o /some/backup/location`