There are two components to back up in a Sitellite installation:
- The web site source files
- The database contents
Assuming your web site document root is /home/you/www, you could create a simple backup with the following shell commands:
# backup the database contents
mysqldump --add-drop-table -p -u USER DBNAME > backup.sql
(enter password when prompted)
# make a tarball of the entire site incl. database
tar -cf backup.tar www backup.sql
gzip backup.tar
# remove the backup.sql file
rm backup.sql
# copy the tarball to a secondary/network drive
cp backup.tar.gz /path/to/backups
To restore from such a backup file, assuming the file has been copied back into your /home/you folder, you could say:
# unpack the tarball, overwriting the web site
tar -zxf backup.tar.gz
# restore the database
mysql -p -u USER DBNAME < backup.sql
# remove the extra files
rm backup.tar.gz
rm backup.sql
Revised on October 28, 2005 5:46 AM by lux
Back in time (1 more) | Linked from: Miscellaneous, Upgrading Howto, Administration