MySQL/Dump: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Created page with "<syntaxhighlight lang="bash"> #!/bin/bash : ' @author Academia<devs@chorke.org> @vendor Chorke Academia, Inc. @web chorke.org/academia @version 1.0.00.GA @since 1..."
 
No edit summary
 
Line 1: Line 1:
<syntaxhighlight lang="bash">
{|class='wikitable' style='width:100%;margin:-11px 0 6px 0'
|valign='top' style='width:50%'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
#!/bin/bash
#!/bin/bash
: '
: '
Line 19: Line 21:
mysqldump $p > $f
mysqldump $p > $f
</syntaxhighlight>
</syntaxhighlight>
|valign='top' style='width:50%'|
|}

Latest revision as of 07:35, 16 January 2026

#!/bin/bash
: '
 @author  Academia<devs@chorke.org>
 @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