]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - UPGRADE
Database fields with timestamp type now allow CURRENT_TIMESTAMP to be set as default...
[quix0rs-gnu-social.git] / UPGRADE
1 Upgrading
2 =========
3
4 GNU social 1.1.x to GNU social 1.2.x
5 ------------------------------------
6
7 If you are tracking the GNU social git repository, we currently recommend
8 using the "master" branch (or nightly if you want to use latest features)
9 and follow this procedure: 
10
11 0. Backup your data. The StatusNet upgrade discussions below have some
12     guidelines to back up the database and files (mysqldump and rsync).
13
14     MAKE SURE YOU ARE THE SAME USER THAT RUNS THE PHP FILES WHILE PERFORMING
15     THE COMMANDS BELOW (I usually prepend the commands with 'sudo -u social')
16
17 1. Stop your queue daemons (you can run this command even if you do not
18     use the queue daemons):
19     $ bash scripts/stopdaemons.sh
20
21 2. Run the command to fetch the latest sourcecode:
22     $ git pull
23     
24     If you are not using git we recommend following the instructions below
25     for upgrading "StatusNet 1.1.x to GNU social 1.2.x" as they are similar.
26
27 3. Run the upgrade script:
28     $ php scripts/upgrade.php
29
30    The upgrade script will likely take a long time because it will
31     upgrade the tables to another character encoding and make other
32     automated upgrades. Make sure it ends without errors. If you get
33     errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues
34
35 4. Start your queue daemons again (you can run this command even if you
36     do not use the queue daemons):
37     $ bash scripts/startdaemons.sh
38
39 5. Report any issues at https://git.gnu.io/gnu/gnu-social/issues
40
41 If you are using ssh keys to log in to your server, you can make this
42 procedure pretty painless (assuming you have automated backups already).
43 Make sure you "cd" into the correct directory (in this case "htdocs")
44 and use the correct login@hostname combo:
45     $ ssh social@domain.example 'cd htdocs
46             && bash scripts/stopdaemons.sh
47             && git pull
48             && time php scripts/upgrade.php
49             && bash scripts/startdaemons.sh'
50
51 StatusNet 1.1.x to GNU social 1.2.x
52 -----------------------------------
53
54 We cannot support migrating from any other version of StatusNet than 
55 1.1.1. If you are running a StatusNet version lower than this, please 
56 follow the upgrade procedures for each respective StatusNet version.
57
58 You are now running StatusNet 1.1.1 and want to migrate to GNU social
59 1.2.x. Beware there may be changes in minimum required version of PHP
60 and the modules required, so review the INSTALL file (php5-intl is a
61 newly added dependency for example).
62
63 * Before you begin: Make backups. Always make backups. Of your entire 
64 directory structure and the database too. All tables. All data. Alles.
65
66 0. Make a backup of everything. To backup the database, you can use a
67 variant of this command (you will be prompted for the database password):
68     $ mysqldump -u dbuser -p dbname > social-backup.sql
69
70 1. Stop your queue daemons 'bash scripts/stopdaemons.sh' should do it.
71     Not everyone runs queue daemons, but the above command won't hurt.
72
73 2. Unpack your GNU social code to a fresh directory. You can do this
74     by cloning our git repository:
75     $ git clone https://git.gnu.io/gnu/gnu-social.git gnusocial
76
77 3. Synchronize your local files to the GNU social directory. These 
78     will be the local files such as avatars, config and files:
79
80         avatar/*
81         file/*
82         local/*
83         .htaccess
84         config.php
85
86     This command will point you in the right direction on how to do it:
87     $ rsync -avP statusnet/{.htaccess,avatar,file,local,config.php} gnusocial/
88
89 4. Replace your old StatusNet directory with the new GNU social
90     directory in your webserver root.
91
92 5. Run the upgrade script: 'php scripts/upgrade.php'
93    The upgrade script will likely take a long time because it will
94     upgrade the tables to another character encoding and make other
95     automated upgrades. Make sure it ends without errors. If you get
96     errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues
97
98 6. Start your queue daemons: 'bash scripts/startdaemons.sh'
99
100 7. Report any issues at https://git.gnu.io/gnu/gnu-social/issues