Backup commands: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
No edit summary
Line 7: Line 7:
(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).
(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 go to /www/html/w and type
*To create a backup of the web directory, login as wiki and then

cd /www/html/w
tar cvzf web-backup-<yymmdd>.tar.gz *
tar cvzf web-backup-<yymmdd>.tar.gz *

Revision as of 10:10, 2 September 2005

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

(for us, username is wikiuser and nameofyourdatabase is wikidb; yymmdd is what it always is).

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