久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

Gallery: 如何用備份文件進行還原操作:修訂間差異

來自站長百科
跳轉至: 導航、? 搜索
無編輯摘要
?
第1行: 第1行:
__FORCETOC__
__FORCETOC__


=How to restore Gallery 2 from a backup? =
=如何用備份還原Gallery 2? =
* Either you have a regular backup consisting of:
* 常規(guī)備份包括有:
** A database backup
** 數(shù)據(jù)庫備份
** A storage directory (g2data) backup from the same point in time as the database backup (including all files / directories within g2data, not just g2data/albums)
** 存儲目錄(g2data)備份(包含g2data中所有文件和目錄,不僅僅是g2data/相冊)
** A backup of your config.php and optionally of your whole gallery2 directory
** 你config.php文件的備份,可選的還有整個gallery2目錄的備份
* Or something bad happened and you only have your old g2data or just the g2data/albums folder
* 或者遇上麻煩,只有舊g2data或g2data/相冊文件夾的備份


Then Gallery 2 can be restored from your backup. If you have just the g2data folder and not the database, then only the album structure with all images can be restored. The registered users, comments, customfields etc. are all lost if you don't have a database backup. Also, all item titles, summries, descriptions etc. are lost without a database backup.
Gallery 2可以通過你所作的備份來進行還原。如果只有g2data文件夾備份沒有數(shù)據(jù)庫備份的話,那就只能還原含有全部圖片的相冊結構而注冊用戶數(shù)據(jù),評論和自定義字段等都無法還原,因為你沒有數(shù)據(jù)庫備份。另外所有項目標題,摘要和描述等也因無數(shù)據(jù)庫備份而無法還原。


If you have just a database backup and no g2data backup, you've lost all your albums and images. And G2 cannot be restored from the database only.
如果只有數(shù)據(jù)庫備份而無g2data備份的話,所有相冊及圖片將無法還原。G2無法僅通過數(shù)據(jù)庫備份進行還原


See:
參見:
* [[Gallery:How_do_I_Make_Backups_of_My_Database|How do I make backups of my database?]]
* [[Gallery:How_do_I_Make_Backups_of_My_Database|如何對我的數(shù)據(jù)庫進行備份?]]
* [[Gallery:faq#How_can_I_move_my_gallery_installation_from_one_server_to_another.3F|How can I move my Gallery installation from one server to another?]]
* [[Gallery:常見問題#如何將Gallery的安裝從一個服務器移動到另一個中?|如何將Gallery的安裝從一個服務器移動到另一個中?]]
* [[Gallery:faq#How_can_I_move_my_gallery_installation_from_one_folder_to_another.3F|How can I move my Gallery installation from one folder to another?]]
* [[Gallery:常見問題#如何將Gallery的安裝從一個文件夾移動到另一個中?|如何將Gallery的安裝從一個文件夾移動到另一個中?]]


==Restoring Gallery 2 from a full backup==
==用完整的備份還原Gallery 2==
* If you have a complete backup (database, g2data folder, gallery2 folder including config.php), then just put those things back in place and make sure the webserver user has write permissions on the g2data folder (chmod -R 777 g2data) and it should work again
* 如果你有一個完整的備份(數(shù)據(jù)庫,g2data文件夾,含有config.php的gallery2文件夾),那就將這些都放歸原位,并確保web服務器用戶對g2data文件夾可寫(chmod -R 777 g2data)并且可以正常運行。


* If you have lost config.php or if your g2data backup is incomplete (only albums/ folder, or lost g2data/versions.dat file, ...) then...
* 如果你丟失了config.php文件夾或者你的g2data備份不完整(僅有albums/文件夾或g2data/versions.dat文件缺失)的話,那么…
** you need to run the installer again, but point to your existing storage folder (g2data) and to your existing database in the appropriate installer steps (step 4 and 5).
** 你需要重新運行安裝程序,在適當?shù)陌惭b步驟(第四步和第五步)中指向現(xiàn)有的存儲文件夾(g2data)以及現(xiàn)有的數(shù)據(jù)庫。
** In the setup storage directory step, it will automatically recreate the missing folders if there are any (locks, sessions, ...). Make sure the webserver user has write permissions on the g2data folder (chmod -R 777 g2data)
** 安裝存儲目錄步驟中,如果有缺失的文件夾(lock,session)的話,它會重新進行創(chuàng)建。確保web服務器用戶對g2data文件夾可寫(chmod -R 777 g2data)。
** If you have lost or did not make a backup of g2data/versions.dat, you need to manually create a new one (or recover the first line).? A versions.dat file is just a text file and has 2 lines, e.g.
** 如果你丟失了g2data/versions.dat文件夾或沒有對其做備份的話,就需要手動新建一個(或恢復第一行)。versions.dat文件就是一個文本文件并含有兩行 ,如
? 1.0.0
? 1.0.0
? Gallery-2.0
? Gallery-2.0
or something like that.? The second line isn't important.? The first line must be the version of your g2 core module. You can find the version in the database.
這樣的語句。第二行不重要而第一行則必須為你g2核心模塊的版本。你可以在數(shù)據(jù)庫中找到此版本號。
? SELECT g_parameterValue FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version';
? SELECT g_parameterValue FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version';
** In the Database Setup Step, enter the database connection information to use your existing Gallery 2 database. After hitting save, you should see 2 new options: "erase" and "reuse". ''Reuse'' will reuse your existing g2data/database and that's what you want. Click reuse. (Warning: Erase would delete everything in your database and in g2data and you'd lose everything).
** 在數(shù)據(jù)庫安裝步驟,輸入數(shù)據(jù)庫連接來使用你現(xiàn)有的Gallery2數(shù)據(jù)庫。點擊保存后,就可以看到兩個新選項:"清除(erase)"和"重新使用(reuse)"。選擇"重新使用(reuse)"將重新使用你現(xiàn)有的g2data/數(shù)據(jù)庫而這正是你需要的。那么就點擊它(警告:清除(erase)會刪除數(shù)據(jù)庫和g2data中的所有內(nèi)容)。
** And after the write config.php step (step 7), you can stop the installer and just browse to main.php. Your Gallery 2 should be up and running again.
** 在寫入config.php步驟(第七步)完成后,你就可以停止安裝程序并瀏覽main.php了。現(xiàn)在你的Gallery2就還原并可使用了。


==Recovering Gallery 2 from the storage directory only==
==僅用存儲目錄還原Gallery 2==
If you have lost everything but your g2data folder or just g2data/albums/ , then you can recover the whole album structure with all images with a few clicks
如果除了g2data文件夾或g2data/albums/以外所有東西都沒有的話,那么回復含有全部圖片的整個相冊結構還是很簡單的。


# Move your albums/ folder away into another directory
# 將albums/文件夾移動到其他的某個目錄之下。
# Then install a fresh Gallery 2. Forget about your old g2data folder, it's of no use anymore (just make sure your old albums folder is in a safe place, outside your new g2data directory).
# 接著新安裝一個Gallery 2。不用管你的舊g2data文件夾了,現(xiàn)在它已毫無用處(只要保證舊的相冊文件夾放置在一個安全的位置,即新g2data目錄之外即可)。
# After the installation has been completed, use the "Add items" -> "from local server" method to add the whole old structure with all albums and images.
# 安裝完成之后,使用"添加項目(Add items)" -> "自本地服務器(from local server)"的方法來添加含有所有相冊和圖片的舊結構。
:: See: [[Gallery:How_to_Add_Items#How_to_Add_Items_from_the_Local_Server|How to Add items from the Local Server]]
:: 參見:[[Gallery:How_to_Add_Items#How_to_Add_Items_from_the_Local_Server|如何從本地服務器添加項目]]


[[Category:Gallery 2:Administration and Maintenance]]
[[Category:Gallery 2:Administration and Maintenance]]

2008年8月18日 (一) 10:04的最新版本


如何用備份還原Gallery 2?[ ]

  • 常規(guī)備份包括有:
    • 數(shù)據(jù)庫備份
    • 存儲目錄(g2data)備份(包含g2data中所有文件和目錄,不僅僅是g2data/相冊)
    • 你config.php文件的備份,可選的還有整個gallery2目錄的備份
  • 或者遇上麻煩,只有舊g2data或g2data/相冊文件夾的備份

Gallery 2可以通過你所作的備份來進行還原。如果只有g2data文件夾備份沒有數(shù)據(jù)庫備份的話,那就只能還原含有全部圖片的相冊結構而注冊用戶數(shù)據(jù),評論和自定義字段等都無法還原,因為你沒有數(shù)據(jù)庫備份。另外所有項目標題,摘要和描述等也因無數(shù)據(jù)庫備份而無法還原。

如果只有數(shù)據(jù)庫備份而無g2data備份的話,所有相冊及圖片將無法還原。G2無法僅通過數(shù)據(jù)庫備份進行還原

參見:

用完整的備份還原Gallery 2[ ]

  • 如果你有一個完整的備份(數(shù)據(jù)庫,g2data文件夾,含有config.php的gallery2文件夾),那就將這些都放歸原位,并確保web服務器用戶對g2data文件夾可寫(chmod -R 777 g2data)并且可以正常運行。
  • 如果你丟失了config.php文件夾或者你的g2data備份不完整(僅有albums/文件夾或g2data/versions.dat文件缺失)的話,那么…
    • 你需要重新運行安裝程序,在適當?shù)陌惭b步驟(第四步和第五步)中指向現(xiàn)有的存儲文件夾(g2data)以及現(xiàn)有的數(shù)據(jù)庫。
    • 安裝存儲目錄步驟中,如果有缺失的文件夾(lock,session)的話,它會重新進行創(chuàng)建。確保web服務器用戶對g2data文件夾可寫(chmod -R 777 g2data)。
    • 如果你丟失了g2data/versions.dat文件夾或沒有對其做備份的話,就需要手動新建一個(或恢復第一行)。versions.dat文件就是一個文本文件并含有兩行 ,如
1.0.0
Gallery-2.0

這樣的語句。第二行不重要而第一行則必須為你g2核心模塊的版本。你可以在數(shù)據(jù)庫中找到此版本號。

SELECT g_parameterValue FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version';
    • 在數(shù)據(jù)庫安裝步驟,輸入數(shù)據(jù)庫連接來使用你現(xiàn)有的Gallery2數(shù)據(jù)庫。點擊保存后,就可以看到兩個新選項:"清除(erase)"和"重新使用(reuse)"。選擇"重新使用(reuse)"將重新使用你現(xiàn)有的g2data/數(shù)據(jù)庫而這正是你需要的。那么就點擊它(警告:清除(erase)會刪除數(shù)據(jù)庫和g2data中的所有內(nèi)容)。
    • 在寫入config.php步驟(第七步)完成后,你就可以停止安裝程序并瀏覽main.php了?,F(xiàn)在你的Gallery2就還原并可使用了。

僅用存儲目錄還原Gallery 2[ ]

如果除了g2data文件夾或g2data/albums/以外所有東西都沒有的話,那么回復含有全部圖片的整個相冊結構還是很簡單的。

  1. 將albums/文件夾移動到其他的某個目錄之下。
  2. 接著新安裝一個Gallery 2。不用管你的舊g2data文件夾了,現(xiàn)在它已毫無用處(只要保證舊的相冊文件夾放置在一個安全的位置,即新g2data目錄之外即可)。
  3. 安裝完成之后,使用"添加項目(Add items)" -> "自本地服務器(from local server)"的方法來添加含有所有相冊和圖片的舊結構。
參見:如何從本地服務器添加項目