Skip to content

Commit

Permalink
fix readme formating
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Apr 15, 2011
1 parent 750d214 commit 8b6a99c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ Michal Papis <mpapis@gmail.com>
### installation
download library:

mkdir ~/lib && cd ~/lib
git clone git://github.com/mpapis/backup_sh.git
mkdir ~/lib && cd ~/lib
git clone git://github.com/mpapis/backup_sh.git

add to your ~/.bash_rc file:

export PATH=$PATH:~/lib/backup_sh
export PATH=$PATH:~/lib/backup_sh

### usage
create simple bash script ~/lib/backup_sh/backup_something.sh:

#!/bin/bash

source ~/lib/backup_sh/backup.sh
backup_dir ~/backups

NAME=your_db_name
SUFFIX=db
dump_mysql
rotate 3
#!/bin/bash
source ~/lib/backup_sh/backup.sh
backup_dir ~/backups
NAME=your_db_name
SUFFIX=db
dump_mysql
rotate 3

add execution rights to the new script:

chmod +x ~/lib/backup_sh/backup_something.sh
chmod +x ~/lib/backup_sh/backup_something.sh

make a test run of backup:

~/lib/backup_sh/backup_something.sh
~/lib/backup_sh/backup_something.sh

add a cron job to run the script:

crontab -e
crontab -e

you probably got an vim editor so press `i` for editing mode and paste this line

6 0 * * * ~/lib/backup_sh/backup_something.sh
6 0 * * * ~/lib/backup_sh/backup_something.sh

and save the changes by pressing `ESC :wq` (vim editor), this will call the backup everyday at 6am.

0 comments on commit 8b6a99c

Please sign in to comment.