[x] Navigation

[x] Wer ist wo
 Bots:
1: Google > Forum 9.x
 Visitors:
1: Forum 9.x
2: Forum 9.x
3: Forum 9.x

[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

Author Message
Ertan
Webmaster


Joined: Mar 19, 2004
Posts: 1240
Location: Germany

PostPost subject: BACKUP.txt
Posted: 14.02.2006 13:27
Reply with quote

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 Serverdaten - verwendete Vers. (Server OS / Apache / MySQL / PHP / DragonflyCMS)


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


Joined: Nov 13, 2004
Posts: 26
Location: Mannheim

PostPost subject: Re: BACKUP.txt
Posted: 15.02.2006 00:45
Reply with quote

PHP:


[Moderatoren]: Golem trage unter Profil >> Sonstiges deine Serverdaten ein! Crying or Very sad
Back to top
View user's profile Send e-mail Visit poster's website
Ertan
Webmaster


Joined: Mar 19, 2004
Posts: 1240
Location: Germany

PostPost subject: Re: BACKUP.txt
Posted: 19.02.2006 16:46
Reply with quote

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

Ertan's Serverdaten - verwendete Vers. (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