snipt

Ctrl+h for KB shortcuts

Batchfile

MySQL back up whole database

1
2
3
4
mysqldump -h [hostname] -u[Username] -p[Password] [DatabaseName] > /home/content/96/7858396/html/_db_backups/db_daily_backup.sql


//When replace, donot add brackets.
https://snipt.net/embed/2b178713ea21aff97e11dd6a1a89e7f6/
/raw/2b178713ea21aff97e11dd6a1a89e7f6/
2b178713ea21aff97e11dd6a1a89e7f6
bat
Batchfile
4
2019-05-21T13:51:24
True
False
False
/api/public/snipt/37737/
mysql-back-up-whole-database
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mysqldump -h [hostname] -u[Username] -p[Password] [DatabaseName] <span class="p">&gt;</span> /home/content/96/7858396/html/_db_backups/db_daily_backup.sql </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>//When replace, donot add brackets. </span></pre></div> </td></tr></table>
cmd, mysql