Update README.md

This commit is contained in:
Mike Peralta 2018-09-01 05:21:11 -07:00 committed by GitHub
parent 6977ae1e5b
commit 18534678f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
A simple python script utilizing rsync for both full and differential backups, and auto folder naming, over SSH A simple python script utilizing rsync for both full and differential backups, and auto folder naming, over SSH
Honestly this is more of a wrapper around rsync's beautiful functionality. It simply makes daily backups slightly easier by: Honestly this is more of a wrapper around rsync's beautiful functionality. It simply makes daily backups slightly easier by:
* Automatically choosing a *full* or *differential* backup type, based on whether it detects an existing *full* backup folder * Automatically choosing a *full* or *differential* backup type, based on whether it detects an existing *full* backup folder at the remote end
* Automatically generate a folder based on today's date and time, so you can generate a great many *differential* backup folders without manually changing anything * Automatically generate a folder based on today's date and time, so you can generate a great many *differential* backup folders without manually changing anything
## Requirements ## Requirements
@ -10,6 +10,9 @@ Honestly this is more of a wrapper around rsync's beautiful functionality. It si
* python3 * python3
* Backup server accessible over SSH * Backup server accessible over SSH
## Assumptions
* Your backup destination is an SSH server
## Command Line Arguments ## Command Line Arguments
* ```--full``` Forces the script to run a *full* backup * ```--full``` Forces the script to run a *full* backup
* ```--differential``` Forces the script to run an *incremental* backup * ```--differential``` Forces the script to run an *incremental* backup
@ -19,6 +22,13 @@ Honestly this is more of a wrapper around rsync's beautiful functionality. It si
* ```--remote-user <username>``` Specifies the remote username to use, when connecting to the remote host * ```--remote-user <username>``` Specifies the remote username to use, when connecting to the remote host
* ```--remote-dir <directory>``` Specifies the remote backup destination directory * ```--remote-dir <directory>``` Specifies the remote backup destination directory
* ```--ssh-key <path to key>``` Specifies the local ssh key to use for authentication * ```--ssh-key <path to key>``` Specifies the local ssh key to use for authentication
* ```--exclude <dir>``` Specifies a source directory to exclude (can be passed multiple times)
## Example
For daily use, you'll probably want to create a small bash script that calls this script with the parameters you want, and then call that with cron daily (or whatever your preference is)
```#!/bin/bash
/path/to/mikes-backup --log-dir "/my/log/dir" --source-dir "/home/or/whatever" --remote-host "my-awesome-host.home" --remote-user "me" --remote-dir "/path/to/backup/destination/on/remote/" --ssh-key "/home/me/.ssh/id_rsa" --exclude "/my/dumb/downloads"```
## Questions ## Questions
I realize these docs are sparse at best, so please send in questions if you have any, and I will try to update this file or create a Wiki if need be I realize these docs are sparse at best, so please send in questions if you have any, and I will try to update this file or create a Wiki if need be