Difference between revisions of "Upgrading/Data Version 9"

From Dreamwidth Notes
Jump to: navigation, search
m (added cat)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Warn|text='''DRAFT!''' '''VERY IMPORTANT:''' This '''SHOULD NOT BE DONE YET''' -- this is just a draft!}}
+
These instructions are for upgrading your database to data version 9.  This update is for performance improvements so that icons can be renamed.
  
These instructions are for upgrading your database to version 9.  This update is for performance improvements so that icons can be renamed.
+
The first step is to upgrade to the lastest code as described in [[Dev Maintenance|Updating the Dreamwidth code]], especially:
  
The first step is to upgrade to the lastest code as described in [[Dev Maintenance|Updating the Dreamwidth code]]:
+
{{Snippets/Updating_code|description=0}}
 
+
cd $LJHOME
+
bin/cvsreport.pl -update
+
# only sync changes from the CVS to the live code
+
bin/cvsreport.pl -sync -cvsonly
+
bin/cvsreport.pl -sync -cvsonly
+
  
 
It's also recommended that you delete files that don't exist in the code anymore from $LJHOME:
 
It's also recommended that you delete files that don't exist in the code anymore from $LJHOME:
  
cd $LJHOME
+
{{Snippets/Deleting removed files}}
for i in `bin/cvsreport.pl -n -1`; do
+
    echo "Removing $i" && rm $i;
+
done
+
 
+
  
 
Then, you will want to run this program:
 
Then, you will want to run this program:
  
 
  perl $LJHOME/bin/upgrading/d8d9-userpicrename.pl
 
  perl $LJHOME/bin/upgrading/d8d9-userpicrename.pl
 
 
If you're on a hack or other unclustered machine, run it with <code>--cluster=0</code>:
 
 
perl $LJHOME/bin/upgrading/d8d9-userpicrename.pl --cluster=0
 
  
 
Here's an example of the help output and usage output of the script:
 
Here's an example of the help output and usage output of the script:
Line 35: Line 20:
 
     --cluster=N Specify user cluster to work on (by default, all clusters)
 
     --cluster=N Specify user cluster to work on (by default, all clusters)
 
     --hours=N  Work no more than N hours (by default, work until all is done)
 
     --hours=N  Work no more than N hours (by default, work until all is done)
 +
    --user=N    Specify users to migrate (by default, all users on the specified clusters)
 
     --verbose  Be noisy
 
     --verbose  Be noisy
 
     --help      Print this help and exit
 
     --help      Print this help and exit
Line 42: Line 28:
 
  --- Upgrading users to dversion (userpicmap3) ---
 
  --- Upgrading users to dversion (userpicmap3) ---
 
   
 
   
  Total users at dversion 87: 0
+
  Total users at dversion 8: 0
 
   
 
   
 
  Got 0 users on cluster 0 with dversion=8
 
  Got 0 users on cluster 0 with dversion=8
Line 49: Line 35:
 
  --- Done migrating 0 of 0 users to dversion 9 ---
 
  --- Done migrating 0 of 0 users to dversion 9 ---
 
  dw@dw-dev:~$
 
  dw@dw-dev:~$
 +
 +
[[Category: Production]]

Latest revision as of 20:29, 12 August 2015

These instructions are for upgrading your database to data version 9. This update is for performance improvements so that icons can be renamed.

The first step is to upgrade to the lastest code as described in Updating the Dreamwidth code, especially:

cd $LJHOME
bin/cvsreport.pl -update
# only sync changes from the CVS to the live code
bin/cvsreport.pl -sync -cvsonly
bin/cvsreport.pl -sync -cvsonly
# order of commands is important
$LJHOME/bin/upgrading/update-db.pl -r -p --innodb
$LJHOME/bin/upgrading/update-db.pl -r --cluster=all --innodb
$LJHOME/bin/upgrading/texttool.pl load

It's also recommended that you delete files that don't exist in the code anymore from $LJHOME:

cd $LJHOME
for i in $(bin/cvsreport.pl -n -1); do 
   echo "Removing $i" && rm $i; 
done

Then, you will want to run this program:

perl $LJHOME/bin/upgrading/d8d9-userpicrename.pl

Here's an example of the help output and usage output of the script:

dw@dw-dev:~$ ~/bin/upgrading/d8d9-userpicrename.pl --help
Usage: /home/dw/bin/upgrading/d8d9-userpicrename.pl [options]
Options:
    --cluster=N Specify user cluster to work on (by default, all clusters)
    --hours=N   Work no more than N hours (by default, work until all is done)
    --user=N    Specify users to migrate (by default, all users on the specified clusters)
    --verbose   Be noisy
    --help      Print this help and exit
dw@dw-dev:~$ ~/bin/upgrading/d8d9-userpicrename.pl
Do you want to update to dversion 9 (userpicmap3)? [N/y] y

--- Upgrading users to dversion (userpicmap3) ---

	Total users at dversion 8: 0

	Got 0 users on cluster 0 with dversion=8
	Got 0 users on cluster 1 with dversion=8
	Got 0 users on cluster 2 with dversion=8
--- Done migrating 0 of 0 users to dversion 9 ---
dw@dw-dev:~$