Backup commands: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
No edit summary
Line 10: Line 10:
*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


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

Revision as of 13:53, 5 December 2005

The current script runs in /home/backup

  • 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 .