Author |
Message |
jonfry

Joined: 29 Dec 2004
Posts: 4
Location: Willerby, East Yorkshire
|
Posted:
Wed Dec 29, 2004 1:17 am |
  |
First of all a big thank you for enabling me to run Apache, something I have wanted to do for a long time but didn't have the skills to complete on my own. Thanks to this script I now run Apache and I'm learning the directives and configuration meaning A2T is as educational as it is an excellent compilation of software. Thank you.....
I am running A2T version 1.4.0 and would like to upgrade to version 1.5.0. I have added vhosts and made other subtle changes to my httpd.conf file aswell as ssl.conf, php.ini and my.ini. When I run the version 1.5.0 installer will it overwrite these files?
Also, is there anything I should be aware of before upgrading? I will of course be backing up my files before this but as I'm new to A2T and haven't carried out an upgrade before I want as much information as possible before I do and mess it up!!
Jon
(Running A2T on Win XP Pro) |
|
|
      |
 |
Vlad Alexa Mancini
lead developer

Joined: 07 Jul 2003
Posts: 1539
|
Posted:
Wed Dec 29, 2004 10:03 am |
  |
will make a more detailed tutorial about this but for now here goes
before uninstall
back up only your files , no apache2triad files
use phpmyadmin to export your databases to sql files
copy only your added httpd config lines to user.conf
after new install
copy your files back
create and import your databases with phpmyadmin
copy user.conf to $installpath/conf/user.conf
add the folowing line to the end of httpd.conf
Quote: | Include conf/user.conf |
|
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Wed Dec 29, 2004 3:39 pm |
  |
Is there any important files to backup from opssl? Certificates and such? (sorry I'm new to ssl)
One thing I've done in the past was copy my whole database directory(ies) in PathToMysql\data\DatabaseName and then setup MySql with the same root, and admin pass again, and just copied the folder(s) back.
Also, when we get a list of all the files that need to be archived I'd be interested in making a batch script to copy them for new users. |
Last edited by Joshua Meadows (DemoRic) on Sat Aug 27, 2005 12:09 am; edited 1 time in total |
|
    |
 |
Vlad Alexa Mancini
lead developer

Joined: 07 Jul 2003
Posts: 1539
|
Posted:
Wed Dec 29, 2004 11:41 pm |
  |
only if you make your own certificates , like i said back up every file you added under the installation dir of apache2triad
binary backing up of databases works most of the time but it will not work every time , like when mysql major version is upgraded and in other cases |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Tue Jan 04, 2005 2:34 am |
  |
Hey thanks, I never ran into the SQL problem, but I see how in a major update you'd be correct. Thanks for the advice. It'll have saved me future problems.
Just to show I'm a man of my word. Here's a basic backup script for apache2triad.
Code: | @Echo Off
REM Apache2Triad BackupBatch V0.2 By Demoric
REM http://jaydium.servehttp.com
cls
if exist %1\bin (Echo %1) Else (goto PathNotDefined)
if exist %2\ (Echo %2) else (mkdir %2)
if exist %2\ (Echo %2) else (goto PathNotDefined)
set hour=%time:~0,2%
if "%hour:~0,1%"==" " set hour=0%time:~1,1%
set folder=%date:~10,4%-%date:~4,2%-%date:~7,2%(Time_%hour%_%time:~3,2%_%time:~6,2%)
mkdir %2\%folder%\
@Echo "Backup Started:" >>"%2\%folder%\BackupLog.txt"
date/t>>%2\%folder%\BackupLog.txt
time/t>>%2\%folder%\BackupLog.txt
@Echo On
xcopy/i/h/e/c/k/y "%1\logs" "%2\%folder%\logs" >> "%2\%folder%\BackupLog.txt"
xcopy/i/h/e/c/k/y "%1\htdocs" "%2\%folder%\htdocs" >> "%2\%folder%\BackupLog.txt"
xcopy/i/h/e/c/k/y "%1\mysql\data" "%2\%folder%\mysql\data" >> "%2\%folder%\BackupLog.txt"
xcopy/i/h/e/c/k/y "%1\users" "%2\%folder%\users" >> "%2\%folder%\BackupLog.txt"
xcopy/i/h/e/c/k/y "%1\conf" "%2\%folder%\conf" >> "%2\%folder%\BackupLog.txt"
xcopy/i/h/e/c/k/y "%1\ftp" "%2\%folder%\ftp" >> "%2\%folder%\BackupLog.txt"
@Echo "Backup Completed:" >>"%2\%folder%\BackupLog.txt"
date/t>>%2\%folder%\BackupLog.txt
time/t>>%2\%folder%\BackupLog.txt
Goto End
:PathNotDefined
@Echo Off
Echo Command Syntax must be 'backup "Path To Apache2 Triad" "Path 2 Backup Folder"
Echo Note:There must not be a ending slash, and folders must already exist.
echo.
Echo For example: backup "C:\apache2triad" "C:\ServerBackup"
pause
Goto End
:end
cls
exit
|
I know I'm preaching to the choir but I've learned never assume. Anyways...:
Be sure to save this in a text editor like notepad, and save it with a .bat file extension |
Last edited by Joshua Meadows (DemoRic) on Mon Sep 12, 2005 11:17 pm; edited 2 times in total |
|
    |
 |
door33
tester

Joined: 28 May 2004
Posts: 67
Location: US
|
Posted:
Tue Jan 04, 2005 2:46 am |
  |
|
    |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Wed Jan 05, 2005 10:46 pm |
  |
Actually this thread started earlier (in fact it was mentioned in the 2nd post to that thread). I had seen your script, but I'm just more comfortable in programming batch, since I have no experience or documention for python. Besides options are always nice. Heck it could be written in perl for that matter. That and you don't have to have rar.exe |
|
|
    |
 |
mastertr

Joined: 24 Jul 2006
Posts: 24
|
Posted:
Tue Aug 08, 2006 9:08 am |
  |
the batch file gives errors.
1) File creation error - The process cannot access the file because another process has locked a portion of the file. (in logs directory)
2) File not found - users |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Wed Aug 09, 2006 2:27 pm |
  |
Generally speaking my logs aren't locked when it goes to copy them, if it happens it would be a access error, of the service writting to the log file(s) when the script is trying to copy them. It would prevent it from being copied
If it's a really big issue that you have every log file, you can stop the different services by adding.
Quote: | net stop servicenamehere |
before copying then use
Quote: | net start servicenamehere |
after copying is done.
as for the users part older vers. of a2t used to have a folder called users,
Newer ones don't so you can remove the following line.
Code: | xcopy/i/h/e/c/k/y "%1\users" "%2\%folder%\users" >> "%2\%folder%\BackupLog.txt" |
Note: if you want your logs resolved you could use http://apache2triad.net/forums/viewtopic.php?t=4131
Then it would copy all the log info without problems. |
|
|
    |
 |
|