This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation. |
Difference between revisions of "Moving or backup an installation"
Line 48: | Line 48: | ||
# groupoffice-database.tar.gz | # groupoffice-database.tar.gz | ||
− | + | ||
Installing the old files on the new server | Installing the old files on the new server | ||
Line 67: | Line 67: | ||
mysql> CREATE DATABASE groupoffice; | mysql> CREATE DATABASE groupoffice; | ||
mysql> GRANT ALL PRIVILEGES ON groupoffice.* TO 'groupoffice'@'localhost' | mysql> GRANT ALL PRIVILEGES ON groupoffice.* TO 'groupoffice'@'localhost' | ||
− | -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;</pre> | + | -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION; |
+ | mysql> exit | ||
+ | </pre> | ||
+ | |||
+ | Add your old database structure and data to the new database: | ||
+ | <pre> | ||
+ | mysql -u root -p groupoffice < dumpfile.sql | ||
+ | </pre> | ||
Revision as of 10:34, 27 November 2008
To move Group-Office to another location move all files and the database into the new folder.
Note: All the directories here are examples. They are probably different in your case. Packing up files at the old server
Create an archive of the Group-Office files:
$ tar czf groupoffice-scripts.tar.gz /var/www/groupoffice
Now determine where user files are stored:
$ cat /var/www/groupoffice/config.php | grep local_path $config['local_path']='/var/www/go-local/';
And the same goes for these files:
$ cat config.php | grep file_storage_path $config['file_storage_path']='/home/groupoffice/';
Now create archives of these paths (It might be that the local path is inside the Group-Office scripts directory. In that case you can skip the creation of the local archive):
$ tar czf groupoffice-local.tar.gz /var/www/go-local $ tar czf groupoffice-files.tar.gz /home/groupoffice
This command outputs the database parameters:
$ cat config.php | grep db $config['db_type']='mysql'; $config['db_host']='localhost'; $config['db_name']='groupoffice'; $config['db_user']='groupoffice'; $config['db_pass']='password';
Now create a dump of the database:
$ mysqldump groupoffice -u groupoffice -p > groupoffice-20070813.sql
You might want to tar this file up to save bandwidth:
$ tar czf groupoffice-database.tar.gz groupoffice-20070813.sql
Now we packed up all nessecary files in archives:
- groupoffice-scripts.tar.gz
- groupoffice-files.tar.gz
- groupoffice-local.tar.gz
- groupoffice-database.tar.gz
Installing the old files on the new server
Unpack the scripts, files and local archive in the new location:
$ cd /var/www/groupoffice $ tar zxf groupoffice-scripts.tar.gz $ cd /home/groupoffice $ tar zxf groupoffice-files.tar.gz $ cd /var/www/go-local $ tar zxf groupoffice-local.tar.gz
Create a new database for Group-Office:
$ mysql -u root -p mysql> CREATE DATABASE groupoffice; mysql> GRANT ALL PRIVILEGES ON groupoffice.* TO 'groupoffice'@'localhost' -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION; mysql> exit
Add your old database structure and data to the new database:
mysql -u root -p groupoffice < dumpfile.sql
Now you need to run http://some_url_to_groupoffice.com/install/install.php and follow instructions to complete the install.
Good luck!