 |
Apache2Triad Help, Support and Development The apache2triad help , support and development forums
|
| View previous topic :: View next topic |
| Author |
Message |
stooi
Joined: 31 Dec 2004
Posts: 2
|
| Posted: Fri Dec 31, 2004 3:07 pm Post subject: Backup apache2triad |
|
|
How can I backup everything that I've installed and changed since I first install apache2triad. I mean EVERYTHING and how do I restore it back?
Thanks
ST Ooi |
|
| Back to top |
|
Vlad Alexa Mancini
Joined: 07 Jul 2003
Posts: 1538
|
| Posted: Fri Dec 31, 2004 7:04 pm Post subject: |
|
|
| see my reply on http://apache2triad.net/forums/viewtopic.php?t=870 |
|
| Back to top |
|
stooi
Joined: 31 Dec 2004
Posts: 2
|
| Posted: Fri Dec 31, 2004 11:27 pm Post subject: What about email accounts? |
|
|
OK, the most important part is my email accounts, currently I have 3 domains hosted and I wanted to make a backup regularly to avoid any disaster.
Does anyone has any script that could backup all files all at once and restore to another system? |
|
| Back to top |
|
door33
Joined: 28 May 2004
Posts: 67
Location: US
|
| Posted: Sat Jan 01, 2005 12:10 am Post subject: |
|
|
yea i made this script a while back but you need to edit it so that it fits your needs use it at your own risk
- Aug 27 2005 Update
Updated code.
- June 29, 2005 Update
No more need for rar.exe just need to have python.
Automatically finds apache2triad install dir
Code:
#!f:/apache2triad/python/bin/python.exe
#
# Backup Script
# By : Frank Barela
# Email : frank<at>slickcode.org
#
import os
import os.path
import _winreg
import tarfile
handle=_winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
result=_winreg.OpenKey(handle,"SOFTWARE\\Apache2triad")
name,value,type=_winreg.EnumValue(result,1)
a2t_path = value
if not os.path.exists("C:/apache2triadbackup"):
os.makedirs("C:/apache2triadbackup")
tar = tarfile.open("C:/apache2triadbackup/apache2triad_backup.tar", "w")
for name in [os.path.join(a2t_path, "conf")]:
tar.add(name)
for name in [os.path.join(a2t_path, "htdocs")]:
tar.add(name)
for name in [os.path.join(a2t_path, "ftp","slimftpd.conf")]:
tar.add(name)
for name in [os.path.join(a2t_path, "mail","mailusers.tab")]:
tar.add(name)
for name in [os.path.join(a2t_path, "mail","domains.tab")]:
tar.add(name)
for name in [os.path.join(a2t_path, "mysql","data")]:
tar.add(name)
tar.close()
|
|
| Back to top |
|
LiquidSnake
Joined: 23 May 2004
Posts: 267
Location: Middlesboro, KY
|
| Posted: Sat Jan 01, 2005 12:50 am Post subject: |
|
|
If you wanted an automated process, you could tell the task scheduler to run that script as well..
Also, you may want to be carefully by simply zipping up data in MySql, should export the data.. Problem is, if you just zip it, the new mysql may not recognize the format. this is a problem I ran into writing my apache2triad backup proggie. however if you export the data, you'll have no problems recovering. |
|
| Back to top |
|
mastertr
Joined: 24 Jul 2006
Posts: 24
|
| Posted: Tue Aug 08, 2006 8:52 am Post subject: |
|
|
| how do i run this script? |
|
| Back to top |
|
DELETED
Guest
|
| Posted: Wed Oct 31, 2007 7:12 am Post subject: |
|
|
| DELETED |
|
| Back to top |
|
| |
|