snipt

Ctrl+h for KB shortcuts

Bash

Backup mysql with date and time...

mysqldump -u user_name -p database > /path/to/backupfolder/database_backup_$(date +%Y-%m-%d-%H.%M.%S).sql
https://snipt.net/embed/3ec753bbeba4eee1f212b8d98ea5a6fe/
/raw/3ec753bbeba4eee1f212b8d98ea5a6fe/
3ec753bbeba4eee1f212b8d98ea5a6fe
bash
Bash
1
2019-08-23T11:17:53
True
False
False
Jan 22, 2013 at 11:35 AM
/api/public/snipt/54243/
backup-mysql-with-date-and-time
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mysqldump -u user_name -p database &gt; /path/to/backupfolder/database_backup_<span class="k">$(</span>date +%Y-%m-%d-%H.%M.%S<span class="k">)</span>.sql </span></pre></div> </td></tr></table>
"mysql backup", "mysql export"