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