[x] Navigation

[x] Languages

[x] Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

[x] Downloads (Top)

BACKUP.txt
Als Dragonfly CMS Einsteiger bist Du mit Deinen Fragen hier genau richtig.

View previous topic :: View next topic  
Author Message
Ertan
Webmaster
Webmaster

Offline Offline
Joined: Mar 19, 2004
Posts: 1263
Location: Germany
PostPosted: 14.02.2006 14:27
Post subject: BACKUP.txt

PHP:
/**
* CPG Dragonfly CMS
* Copyright (c) 2004-2005 by CPG-Nuke Dev Team, www.dragonflycms.com
* Released under the GNU GPL version 2 or any later version
* $Id: BACKUP.txt,v 1.5 2005/02/02 23:48:05 trevor Exp $
*/

If you have SSH access to your webspace then it's easy to create a backup

Login to the server through SSH and browse to your public_html

For example:

ls /home/MYNAME/public_html

Create a backup of your '
admin' directory to a compressed file:

tar czvpf admin.tar.gz admin

This won'
t include "dotfiles" (the files or directories with names starting
with a dot
). To tar everything:

tar cvzf ../website.tgz * .[a-zA-Z]* *.[a-zA-Z]*

This will backup all of your files, but be aware that this file is publicly
available
, so it's best to pack it somewhere else OR move (mv) the file

When you move the file outside public_html:

mv website.tgz ../website.tgz

Or make the backup somewhere else like:

tar cvzf /home/MYNAME/website.tgz * .[a-zA-Z]* *.[a-zA-Z]*


Of course you can also restore the backup by using the command:

tar -xvzf website.tgz


Note: It doesn'
t matter if you use the file extension 'tar.gz' OR 'tgz'


Backup MySQL Database
---------------------

You can backup/restore your database easily through SSH

To create a backup
:

mysqldump -f -hlocalhost -u<USERNAME> -p<PASSWORD> <DBNAME> --add-drop-table
| gzip -9c >/home/MYNAME/mysqlbackup.sql.gz

To restore the gzipped backup
:

gunzip < mysqlbackup.sql.gz | mysql -u<USERNAME> -p<PASSWORD> <DBNAME>

You can also restore a normal .sql file:

mysql -u<USERNAME> -p<PASSWORD> <DBNAME> < mysqlbackup.sql

Don
't forget to replace<USERNAME>, <PASSWORD> and <DBNAME> with your database
settings


No SSH Access
-------------

If you don'
t have SSH access it's no problem. Maybe you have luck and you can
run exec() or system() commands through PHP to accomplish above tasks

exec('
<command>');
?>

Of course replace <command> with one of the above mentioned commands and try to
run the script (in public_html, example: mydomain.tld/db_backup.php)

_________________
.: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr

Ertan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)


Last edited by Ertan on 24.02.2006 21:54; edited 1 time in total
Back to top
View user's profile Send e-mail Visit poster's website Photo Gallery
Golem
Übersetzer
Übersetzer

Offline Offline
Joined: Nov 13, 2004
Posts: 26
Location: Mannheim
PostPosted: 15.02.2006 01:45
Post subject: Re: BACKUP.txt

PHP:


Golem please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Send e-mail Visit poster's website
Ertan
Webmaster
Webmaster

Offline Offline
Joined: Mar 19, 2004
Posts: 1263
Location: Germany
PostPosted: 19.02.2006 17:46
Post subject: Re: BACKUP.txt

tnx again

_________________
.: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr

Ertan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Send e-mail Visit poster's website Photo Gallery
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ›  Erste Schritte mit Dragonfly CMS 9.x
Page 1 of 1
All times are GMT + 1 Hour



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum




Interactive software released under GNU GPL, Code Credits, Privacy Policy