ets.fulton.asu.edu/files/shared/docs/upgrade_instr...

childlikeprudenceInternet και Εφαρμογές Web

5 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

59 εμφανίσεις

Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
1

of
6



Pre
-
requis
i
tes

to satisfy before completing the steps in this document:




Must be comfortable working with Windows and Linux computers



Must be comfortable working with the command line



Must

have

read

document “
upgrade_instructs
-
summary.doc




Must

have

comple
ted

all

steps in “
upgrade_instructs
-
before
.doc








Software

required

to complete the steps in this document:




website

7
-
Zip



website

Beyond Compare 3.x or later



website

SSH Secure Shell (Secure Shell and Secure FTP clients)



website

Unix tools for Windows package such as “UnixDos”


The 7
-
Zip program is free, while the “SSH Secure Shell” program is free
through ASU’s site
-
license. The other programs are shareware.


7
-
Zip must be used even if another zipping

program, such as “WinZip,” has
already been installed on your computer. Scripts that automate various
processes use zipping commands specific to 7
-
Zip. 7
-
Zip was chosen since
its command
-
line program is free, whereas WinZip’s isn’t, and it is
necessary
to use a command
-
line program in the scripts.







Information

required

to complete the steps in this document:




User id’s and passwords for the “Direct Admin” interface on the
“webhost30” and “webhost40” servers




Direct Admin
-

webhost30



Direct Admin
-

webhost40




“Webhost30” and “webhost40” host our Drupal websites







Schedule




Complete the steps in document “
upgrade_instructs
-
before
.doc
” on the
day before a site is

to be upgraded




Complete the steps in this document during the upgrade, during our
morning maintenance window




Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
2

of
6



For each site to be upgraded
:




Login
as user
“firstAcct”




Take

the

site

offline




Remain

logged

in







Using “Direct Admin,” backup all sites

and all data for each site




http://webhost40.asu.edu



for the “ets” and “etsdev” sites



http://webhost30.asu.edu



for the
“hpc”

site




B
ackup
everything

for each “domain”
-

all files
,

folders

and

databases







With

the “Beyond Compare” program
,
backup each site’s “public_html” folder
to your pc’s hard disk and verify that a full backup has been made.

There
is a “session” defined within “Beyond Compare” for each Drupal site.


T
h
ese backups partially
duplicate the backups m
ade via “Direct Admin,” but
si
te restores are easier with them

than they are
with the “Direct Admin”
backups. These backups

also eliminate
any

need
for
UTO

involvement
with
restores
.


T
o restore
a site af
ter a failed upgrade



Copy the

files
on

your pc
back
to the production server
via secure FTP



R
estore the database
; it will be the only “.sql” file within a “Direct
Admin” backup file







For each site to be upgraded




Print a “modules” listing,
to know after
wards
which modules are enabled




En
sure that all modules are listed on the above printouts



T
his hasn’t been a problem when “ASU Zen”

is the current theme



This can b
e a problem
when

“Blue Marine”
is the current
theme




Disable all third
-
party modules




L
eave
all optional and required
core

modules

as they are




Set the theme to “Blue Marine” or one of the other core themes





Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
3

of
6



For each site, continued




IF

a production site and corresponding development site will be
synchronized,
ma
ke

a

second

backup

via “Direct

Admin” using the steps
above


This second backup is necessary because:



In the first backup the third
-
party modules are still enabled



If the first backup were used in the restore, the third
-
party
modules would still be enabled when running update.php for t
he first
time




DO

NOT

delete the “files” folder




DO

NOT

delete the “hpcweb” and “images” folders on the “hpc” website







Delete the following folders
from

the “public_html” folder:




includes



misc



modules



profiles



scripts



sites



themes







Del
ete the follo
wing files
from

the “public_html” folder:




.htaccess



CHANGELOG.txt



INSTALL.mysql.txt



INSTALL.pgsql.txt




INSTALL.txt



LICENSE.txt



MAINTAINERS.txt



UPGRADE.txt



cron.php



index.php



install.php



robots.txt




update.php



xmlrpc.php








If present, delete the follow
ing files from the “public_html” folder
;
they are unnecessary clutter even though they are not Drupal files:




400.shtml



401.shtml



403.shtml



404.shtml



500.shtml



index.html.moved



logo.jpg





Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
4

of
6



For each site, continued




Using
the secure FTP client from the “
SSH Secure Shell” program:




Verify that the following file transfer options are set:



Mode => binary transfer



674 => default file permissions



77
5 => default folder permissions



These are the permissions that Cameo Hill used




Upload files



Src

=>
site’s “upl
oad” folder, such as “upload_ets”



Dst

=>
site’s “public_html” folder

on webhost30 or webhost40



The file transfer is complete when the contents of
the
right
window are updated to reflect the transfer



When the transfer is complete, right
-
click anywhere in th
e bottom
window and choose “clear finished” to see if there are any files
that did not transfer




Note that
the secure FTP program
must be used
to upload the Drupal
files and folders to webhost30 and webhost40 since
the program

can
set default permissions o
n the uploaded files and folders while
“Beyond Compare” cannot




Note that when the Drupal files and folders are uploaded for each
site,
that
it is OK that the third
-
party modules’ files are
included; it is not a problem for those files and folders to be
pr
esent when running update.php prior to re
-
enabling all of the
modules




Using “Beyond Compare
” and the session setup for the site, verify that
all files and folders from the PC have been correctly copied to the
Drupal host




Some files from the “ASU Zen” the
me don’t always get copied
correctly to the Drupal host




custom.css



node
-
course.tpl.php

(if present)



node
-
homepage.tpl.php




Can
us
e “Beyond Compare

to fix the problem




On the right side, where the files from the PC are listed, right
-
click on the file and
select “Copy To Left” to copy the file up
to webhost30 or webhost40




It is not necessary to reset files’ permissions;
I
checked and
they are OK




Double
-
check what you are doing before proceeding with the “Copy To
Left” command


Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
5

of
6



For each site, continued




IF

a production site and corresponding development site will be
synchronized, see Appendix C for the steps to be performed here




Run update.php




Pray

for success



If
any errors, warnings, or messages result, print the page(s)



Check the error log
to see if
a
ny errors
occurred
while running
update.php




Assuming that all went well with update.php




Re
-
enable all third
-
party modules disabled earlier; see printouts




Re
-
run update.php



Cameo Hill

always does so, no matter what



The third
-
party modules may have databa
se updates too



If
any errors, warnings, or messages result, print the page(s)



Check the error log to see if any errors occurred while running
update.php




Change the site’s theme back to “ASU Zen”



Bring the site back online



Logout



Test!





Appendix A: Kno
wn Script Issues




Fix

scripts to update the tinymce.module file, so that the editing window
can be resized per Jeff Carpenter’s email of 03/12/2008




Fix

the “makeCfgs” script so that the entry for Marc Lesure’s database
server is no longer included in the
“settings.php” file




The entry

isn’t needed anymore



The 5x versions of the ETS and HPC sites have never used this database



The
5x versions of the CEE, CHE, EE, IE, and MAE sites

used this
database until they were subsumed into engineering.asu.edu





Drupal

5.x:


Steps To Complete During Site
U
pgrades

Version 1.7



March 29, 2010


Page
6

of
6

Appe
ndix B: Ideas for Script

Improvement
s




Create a “logout” script for all sites



Create it using a copy of “production_firstAcct.vbs”



URL: <sitename>/logout




Updates to script “copyKprs1.bat”



Pause at the end of the script



Display message(s) when deleting n
on
-
empty folders



If there is a logfile, use “grep” to display all lines containing the
strings “Load comparison: sftp:” and “Successfully synchronized”





Appendix
C
:
Restoring a Production Site Over a Development Site




Login in the production site using

the first account [user/1]




Using “Direct Admin,” a backup that only includes the database




Download

the “Direct Admin”
backup file to your PC
; it will be a “.tar.gz”
archive file




Extract the backup file’s “.sql” file to your PC; there will only be one
“.sql” file within the archive




Using
the “secure shell” FTP program,
copy the extracted .sql
file
to
the
destination server




Using the “secure shell” client, login to “webhost30” or “webhost40”




Restore the database using the following command


mysql

u
<
database
u
ser id>

-
p
<database name>

<
<file name>




When prompted, enter the database user id’s password




The
<
database
user i
d>
,
<database name>
, and
password

are
those from the
restored site’s “settings.php” file
; usually, the database name and the
u
ser id are the same string




Using
the “Beyond Compare” program,
copy the production site’s “files”
folder to
your PC and
verify

that all files were copied correctly




Using the “secure shell” FTP program, copy the files from your PC

to the
destination serve
r




Using the “Beyond Compare” program, verify that all files were copied
correctly




Go to Drupal’s status page, and see if there are any problems reported




Spot
-
test to see if there are any problems