Wiki ⇒ Tips and Tricks | Edit this page

Glossary
The Project
Install
Dragonfly admin interface
Dragonfly public view
Dragonfly Themes
Build local server
Running Dragonfly CVS
• Tips and Tricks
Rules & Regulations
Search the Wiki
Developer's Manual

10: Tips and Tricks

How to get the most out of your Dragonfly website

i. Data Backup

How to easily backup your files and database.

i.a Fast thru PHP on Linux

(doesn't work in safe_mode)
<?php
require_once('config.php');
set_time_limit(0);
header("Content-Type: application/x-gzip; name=\"$dbname.sql.gz\"");
header("Content-disposition: attachment; filename=$dbname.sql.gz");
passthru("mysqldump -f -h$dbhost -u$dbuname -p$dbpass $dbname --add-drop-table | gzip -9cf");

i.b CronJob/SSH

Create a file called mysqlbackup.sh
#! /bin/sh
DBNAME=here
DBUSER=root
DBPASS=fill_in
FILE1=${DBNAME}-`date +%Y%m%d%H%M`.sql
DIR=/home/YOURNAME/
mysqldump -f -hlocalhost -u${DBUSER} -p${DBPASS} --add-drop-table ${DBNAME} | gzip -9c >${DIR}${FILE1}.gz

 Author: Trevor
Created: Wednesday, February 23, 2005 (14:24:38)
Last update: Monday, October 24, 2005 (09:55:27) by gaban
Dedicated Server & Bandwidth Sponsored by DedicatedNOW

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.0729 seconds with 12 DB Queries in 0.0203 seconds
Memory Usage: 1.45 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy