MySQL/Dump

From Chorke Wiki
Revision as of 00:11, 3 November 2018 by Shahed (talk | contribs) (Created page with "<syntaxhighlight lang="bash"> #!/bin/bash : ' @author Academia<[email protected]> @vendor Chorke Academia, Inc. @web chorke.org/academia @version 1.0.00.GA @since 1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#!/bin/bash
: '
 @author  Academia<[email protected]>
 @vendor  Chorke Academia, Inc.
 @web     chorke.org/academia
 @version 1.0.00.GA
 @since   1.0.00.GA
'

h='cdn.chorke.org';
s='chorke_cdnwiki';
u='chorke_cdnwiki';

d="$(date +'%Y%m%d%H%M'|tr '[:lower:]' '[:upper:]')";
printf '\nBacking up of \033[0;32m%s\033[0m:\n' "$u";
printf -v f './%s/wiki_%s_bkp.dump' "$s" "$d";
p="-h$h -u$u -p $s";
mysqldump $p > $f