Gallery2 move server

Backup gallery2 directory:
#cd /srv/http/
#tar -czvf gallery2.tgz gallery2

Backup g2data
#tar -czvf g2data.tgz g2data

Backup database:
#mysqldump -u root -p gallery2 > gallery2.sql

Copy backup file to new server and restore:
#tar -xzvf gallery2.tgz
#tar -xzvf g2data.tgz

Create database:
#mysqladmin -uroot -p create gallery2

Create user account:
#mysql gallery2 -uroot -p -e”GRANT ALL ON gallery2.* TO OLDUSERNAME@localhost IDENTIFIED BY ‘OLDPASSWORD'”

Restore database
#mysql -u root -p gallery2 < gallery2.sql Make sure httpd and php setting can support gallery. Reference: http://freebsd.ntut.idv.tw/document/gallery2_move.html

Leave a Reply

Your email address will not be published. Required fields are marked *