Chuyển cài đặt
From LimeSurvey Manual
Bạn có thể nhận nhiệm vụ chuyển cài đặt LimeSurvey sang máy chủ mới. Quá trình này có thể đơn giản nhưng có thể trở nên phức tạp do các yếu tố khác. Dưới đây, bạn có thể tìm thấy thông tin về cách thực hiện chuyển khoản và những điều cần chú ý, cũng như thông tin về cách khôi phục sau khi gặp phải bất kỳ sự cố nào.
Nói chung, những thay đổi duy nhất từ một bản cài đặt mới và sạch sẽ như sau:
- config.php thường được thay đổi để lưu trữ các tham số cài đặt cơ bản cũng như bất kỳ cài đặt tùy chỉnh nào được thực hiện;
- ' upload/*' có thể chứa các mẫu tùy chỉnh hoặc các tệp đã tải lên;
- Bảng cơ sở dữ liệu SQL lẽ ra phải có dữ liệu được thêm vào các bảng được tạo khi cài đặt. Cũng lưu ý rằng một số bảng mới có thể đã được tạo để lưu bản sao mã thông báo và dữ liệu kết quả từ các cuộc khảo sát đang hoạt động trước đây hoặc hiện đang hoạt động. Những bảng mới này thường được đặt tên là lime_survey_nnn..., lime_tokens_nnn..., lime_oldsurvey_nnn... và lime_oldtokens_nnn... .
Mặt khác, trừ khi bạn truy cập và thực hiện các bản vá tùy chỉnh cho mã, các thay đổi sẽ được giới hạn ở những khu vực này.
Mục tiêu của việc chuyển cài đặt sang hệ thống mới cũng tương tự như nâng cấp. Sự khác biệt lớn nhất là chúng tôi chỉ cố gắng tạo lại cài đặt hiện có trên máy tính mới. Nếu bạn cũng muốn nâng cấp lên phiên bản mới hơn, hãy thực hiện việc này sau khi bạn đã chuyển cài đặt và xác minh rằng nó hoạt động.
Transferring any version
- Prepare and save the old release
- Backup your installation directory files and SQL-based database
- At the command-line level, make a .zip or similar archive of the whole installation directory tree of files
- Use phpMyAdmin or similar to export all tables; or use the LimeSurvey backup entire database button that is located in the Configuration dialog, under the Advanced tab
- Copy your config.php file separately to ease the editing process
- Backup your installation directory files and SQL-based database
- Move the saved release to the new machine
- Unpack your installation files
- Create your new installation directory (same name is convenient)
- Unpack/unzip the installation files into the same folder
- Setup your SQL database
- Create the new database using phpMyAdmin or a command-line interface
- Load the saved SQL-based database to recreate the tables and content
- Unpack your installation files
- Edit config.php to reflect changes from the old release and check your installation
- Be careful to check the database name, username, and password, as well as the installation server name, URL path, and physical directory path to the installation
- Visit the survey admin page or the page of an active survey and check if everything works
- You are good to go now :)
Things that could go wrong
As simple as this appears, things do seem to go wrong sometimes. Take a deep breath. Verify that you followed the steps thoroughly. Otherwise, read below to see where other people got stuck along the way.
Different PHP installation on each machine
Different SQL Database between machines
Different LimeSurvey version (installation and DB backup file archives do not match)
There is a possibility that you did not have the correct installation backup code to match the backed-up SQL database. It could be easy to get these separate backups confused, out of sync, or otherwise separated. There are a few things that can help you find out what version each backup may be. When using the LimeSurvey SQL backup option, the default file name it creates has the date of the backup in the name. Also, if you search inside the SQL database backup file, you will find a section that looks similar to the example provided below where the database version is stored:
#-----------------------------------------------------------------------
# Table data for lime_settings_global
#-----------------------------------------------------------------------
INSERT INTO lime_settings_global VALUES("DBVersion","126");
....
This value is used by the installer to determine how to apply changes to tables when upgrading.