File: backup_table-master.sh

package info (click to toggle)
blootbot 1.1.0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,420 kB
  • ctags: 586
  • sloc: perl: 15,941; sh: 154; makefile: 56; sql: 45
file content (20 lines) | stat: -rwxr-xr-x 437 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

BACKUP_SRCDIR="/var/lib/mysql/"
BACKUP_TDIR="blootbot/"
BACKUP_FILE="/home/a/apt/public_html/tables.tar.bz2"

pwd
echo "Copying... $BACKUP_SRCDIR/$BACKUP_TDIR"
cp -R $BACKUP_SRCDIR/$BACKUP_TDIR ~

if [ -d $BACKUP_TDIR ]; then
    echo "Tarring... $BACKUP_FILE $BACKUP_TDIR"
    tar -Icvf $BACKUP_FILE $BACKUP_TDIR
    echo "Removing..."
    rm -rf $BACKUP_TDIR
else
    echo "ERROR: $BACKUP_TDIR doesn't exist."
fi

exit 0;