You're viewing old version number 2. - Current version

Db-dump.sh

Used to dump the contents in database tables for backup purposes.

#!/bin/bash
dumpdir=/home/myaccount/dbdump
dt=`date +%d-%b-%Y`
dumpfile=$dumpdir/myaccount-dbdump-$dt.sql
/usr/bin/mysqldump --add-drop-table -uDBUSER -pDBPWD  DBNAME > $dumpfile
gzip $dumpfile

#mysql - #database

From JR's : articles
28 words - 283 chars
created on
updated on - #
source - versions

Related articles
Db-dump.sh - Sep 24, 2014



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: Nov 14, 2024 - 6:38 p.m. EST