Home Private Messages Search
CPG Dragonfly™ CMS
 
Wiki ⇒ Tips and Tricks

Wiki ⇒ Tips and Tricks  

Glossary
The Project
Install
Upgrading or Switching
Dragonfly admininistration
Dragonfly public view
Dragonfly Themes
Build local server
Tips and Tricks
Rules & Regulations
v9 Developer's Manual
v10 Developer's manual
Wiki Permissions
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

 
Updated: Monday, October 24, 2005 (09:55:27) by gaban
Created:  Wednesday, February 23, 2005 (14:24:38) by Trevor

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
Interactive software released under GNU GPL, Code Credits, Privacy Policy