Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
d25579e3
Commit
d25579e3
authored
May 09, 2016
by
Igor Pecovnik
Browse files
Bugfix and create dump for all databases
parent
8be6b861
Changes
2
Hide whitespace changes
Inline
Side-by-side
backup and restore/backup.sh
View file @
d25579e3
...
...
@@ -17,6 +17,7 @@ mkdir -p $COPY_TO
function
database_backup
()
{
if
which mysql
>
/dev/null
;
then
mysqldump
-Q
-q
-e
-R
--add-drop-table
-A
-u
$USER
-p
$PASSWORD
>
$COPY_TO
/all.db
for
db
in
$(
echo
'SHOW DATABASES;'
|mysql
-u
$USER
-p
$PASSWORD
-h
$HOST
|grep
-v
'^Database$'
|grep
-v
"^performance_schema"
|grep
-v
"^information_schema"
|grep
-v
"^mysql"
)
;
do
mysqldump
\
...
...
backup and restore/sync.sh
View file @
d25579e3
...
...
@@ -12,7 +12,7 @@ function sync_backup ()
do
if
[[
$next
!=
\#
*
]]
;
then
echo
$next
rsync
--dry-run
-az
--progress
$REMOTE
:
$next
$next
rsync
--dry-run
-az
--progress
$REMOTE
:
$next
$
{
next
%*/*
}
[[
!
$?
-eq
0
]]
&&
read
fi
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment