Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncBash
/
mcBash
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 02040a8b
authored
Dec 04, 2013
by
Frederick d. Maus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql export skript
1 parent
882fadfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
basepath.inc.sh
bin/basepath.inc.sh
bin/exportMysql.sh
basepath.inc.sh
View file @
02040a8
#!/bin/bash
#!/bin/bash
__THIS_DIR
=
$(
pwd
)
'/'
__BASEPATH_EX
=
$__THIS_DIR
#__BASEPATH_EX='./'
#__BASEPATH_EX='./'
__BASEPATH_EX
=
'/home/dev/mcBash/'
#__BASEPATH_EX='/home/dev/mcBash/'
# __PATH_to_mcBash=$__BASEPATH_EX'include/Lib/Tools/mcBash/'
# __PATH_to_mcBash=$__BASEPATH_EX'include/Lib/Tools/mcBash/'
__PATH_to_mcBash
=
$__BASEPATH_EX
__PATH_to_mcBash
=
$__BASEPATH_EX
__PATH_to_Temp
=
$__PATH_to_mcBash
'Temp'
__PATH_to_Temp
=
$__PATH_to_mcBash
'Temp'
__THIS_DIR
=
$(
pwd
)
'/'
bin/basepath.inc.sh
0 → 100755
View file @
02040a8
#!/bin/bash
__THIS_DIR
=
$(
pwd
)
'/'
__BASEPATH_EX
=
$__THIS_DIR
'../'
#__BASEPATH_EX='./'
#__BASEPATH_EX='/home/dev/mcBash/'
# __PATH_to_mcBash=$__BASEPATH_EX'include/Lib/Tools/mcBash/'
__PATH_to_mcBash
=
$__BASEPATH_EX
__PATH_to_Temp
=
$__PATH_to_mcBash
'Temp'
bin/exportMysql.sh
0 → 100755
View file @
02040a8
#!/bin/bash
#
# @package freeSN
# @author dev@mensch.coop
#
. basepath.inc.sh
.
"
$__PATH_to_mcBash
/include.inc.sh"
mc_h1
$0
$1
$2
if
[
-z
$1
]
;
then
mc_h2
"Abruch bitte geben Sie als ersten Parameter eine Datenbank an"
exit
fi
if
[
-z
$2
]
;
then
mc_e
"bitte geben Sie als zweiten Parameter 1 oder 0 an: 1 fuer Programm ausfuehren, 0 fuer Programm simulieren"
fi
DATETIME
=
$(
date +
"%Y%m%d_%H%M%S"
)
BACKUPFILE
=
"mysql.
$1
.
$DATETIME
.sql"
mc_bashsu
"mysqldump --single-transaction --default-character-set=utf8 -u root -p
$1
>
$BACKUPFILE
"
$2
mc_bashsu
"tar -czf
$BACKUPFILE
.tar.gz
$BACKUPFILE
"
$2
mc_bashsu
"rm
$BACKUPFILE
"
$2
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment