Backup commands: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
 
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The current script runs in /home/backup

*To backup the SQL database
*To backup the SQL database

mysqldump -u <username> -p <nameofyourdatabase> > wikidb-backup-05MoDa.sql
mysqldump -q -u wikiuser -p<password> wikidb > wikidb-backup-<yymmdd>.sql
*To create a backup of the web directory, login as wiki, and go to /www/html/w and type
tar cvzf web-backup-2005MoDa.tar.gz *cd
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 .

Latest revision as of 10:29, 19 September 2006

The current script runs in /home/backup

  • To backup the SQL database
mysqldump -q -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 .