Backup commands: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
*To backup the SQL database
*To backup the SQL database


mysqldump -u <username> -p<password> <nameofyourdatabase> > wikidb-backup-<yymmdd>.sql
mysqldump -u wikiuser -p<password> wikidb > wikidb-backup-<yymmdd>.sql
gzip -9 wikidb-backup-<yymmdd>.sql
gzip -9 wikidb-backup-<yymmdd>.sql


(with the obvious substitutions).
(for us, <tt>username</tt> is <tt>wikiuser</tt> and <tt>nameofyourdatabase</tt> is <tt>wikidb</tt>; <tt>yymmdd</tt> is what it always is).


*To create a backup of the web directory, login as wiki and then
*To create a backup of the web directory, login as wiki and then

Revision as of 19:51, 5 September 2005

  • To backup the SQL database
mysqldump -u wikiuser -p<password> wikidb > wikidb-backup-<yymmdd>.sql
gzip -9 wikidb-backup-<yymmdd>.sql

(with the obvious substitutions).

  • To create a backup of the web directory, login as wiki and then
cd /www/html/w
tar cvzf web-backup-<yymmdd>.tar.gz *