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

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

來(lái)自站長(zhǎng)百科
跳轉(zhuǎn)至: 導(dǎo)航、? 搜索
無(wú)編輯摘要
?
第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ù)庫(kù)備份
** 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)
** 存儲(chǔ)目錄(g2data)備份(包含g2data中所有文件和目錄,不僅僅是g2data/相冊(cè))
** A backup of your config.php and optionally of your whole gallery2 directory
** 你config.php文件的備份,可選的還有整個(gè)gallery2目錄的備份
* Or something bad happened and you only have your old g2data or just the g2data/albums folder
* 或者遇上麻煩,只有舊g2data或g2data/相冊(cè)文件夾的備份


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可以通過(guò)你所作的備份來(lái)進(jìn)行還原。如果只有g(shù)2data文件夾備份沒有數(shù)據(jù)庫(kù)備份的話,那就只能還原含有全部圖片的相冊(cè)結(jié)構(gòu)而注冊(cè)用戶數(shù)據(jù),評(píng)論和自定義字段等都無(wú)法還原,因?yàn)槟銢]有數(shù)據(jù)庫(kù)備份。另外所有項(xiàng)目標(biāo)題,摘要和描述等也因無(wú)數(shù)據(jù)庫(kù)備份而無(wú)法還原。


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ù)庫(kù)備份而無(wú)g2data備份的話,所有相冊(cè)及圖片將無(wú)法還原。G2無(wú)法僅通過(guò)數(shù)據(jù)庫(kù)備份進(jìn)行還原


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|如何對(duì)我的數(shù)據(jù)庫(kù)進(jìn)行備份?]]
* [[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:常見問(wèn)題#如何將Gallery的安裝從一個(gè)服務(wù)器移動(dòng)到另一個(gè)中?|如何將Gallery的安裝從一個(gè)服務(wù)器移動(dòng)到另一個(gè)中?]]
* [[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:常見問(wèn)題#如何將Gallery的安裝從一個(gè)文件夾移動(dòng)到另一個(gè)中?|如何將Gallery的安裝從一個(gè)文件夾移動(dòng)到另一個(gè)中?]]


==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
* 如果你有一個(gè)完整的備份(數(shù)據(jù)庫(kù),g2data文件夾,含有config.php的gallery2文件夾),那就將這些都放歸原位,并確保web服務(wù)器用戶對(duì)g2data文件夾可寫(chmod -R 777 g2data)并且可以正常運(yùn)行。


* 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).
** 你需要重新運(yùn)行安裝程序,在適當(dāng)?shù)陌惭b步驟(第四步和第五步)中指向現(xiàn)有的存儲(chǔ)文件夾(g2data)以及現(xiàn)有的數(shù)據(jù)庫(kù)。
** 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)
** 安裝存儲(chǔ)目錄步驟中,如果有缺失的文件夾(lock,session)的話,它會(huì)重新進(jìn)行創(chuàng)建。確保web服務(wù)器用戶對(duì)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文件夾或沒有對(duì)其做備份的話,就需要手動(dòng)新建一個(gè)(或恢復(fù)第一行)。versions.dat文件就是一個(gè)文本文件并含有兩行 ,如
? 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.
這樣的語(yǔ)句。第二行不重要而第一行則必須為你g2核心模塊的版本。你可以在數(shù)據(jù)庫(kù)中找到此版本號(hào)。
? 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ù)庫(kù)安裝步驟,輸入數(shù)據(jù)庫(kù)連接來(lái)使用你現(xiàn)有的Gallery2數(shù)據(jù)庫(kù)。點(diǎn)擊保存后,就可以看到兩個(gè)新選項(xiàng):"清除(erase)"和"重新使用(reuse)"。選擇"重新使用(reuse)"將重新使用你現(xiàn)有的g2data/數(shù)據(jù)庫(kù)而這正是你需要的。那么就點(diǎn)擊它(警告:清除(erase)會(huì)刪除數(shù)據(jù)庫(kù)和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了?,F(xiàn)在你的Gallery2就還原并可使用了。


==Recovering Gallery 2 from the storage directory only==
==僅用存儲(chǔ)目錄還原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/以外所有東西都沒有的話,那么回復(fù)含有全部圖片的整個(gè)相冊(cè)結(jié)構(gòu)還是很簡(jiǎn)單的。


# Move your albums/ folder away into another directory
# 將albums/文件夾移動(dòng)到其他的某個(gè)目錄之下。
# 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).
# 接著新安裝一個(gè)Gallery 2。不用管你的舊g2data文件夾了,現(xiàn)在它已毫無(wú)用處(只要保證舊的相冊(cè)文件夾放置在一個(gè)安全的位置,即新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.
# 安裝完成之后,使用"添加項(xiàng)目(Add items)" -> "自本地服務(wù)器(from local server)"的方法來(lái)添加含有所有相冊(cè)和圖片的舊結(jié)構(gòu)。
:: 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|如何從本地服務(wù)器添加項(xiàng)目]]


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

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


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

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

Gallery 2可以通過(guò)你所作的備份來(lái)進(jìn)行還原。如果只有g(shù)2data文件夾備份沒有數(shù)據(jù)庫(kù)備份的話,那就只能還原含有全部圖片的相冊(cè)結(jié)構(gòu)而注冊(cè)用戶數(shù)據(jù),評(píng)論和自定義字段等都無(wú)法還原,因?yàn)槟銢]有數(shù)據(jù)庫(kù)備份。另外所有項(xiàng)目標(biāo)題,摘要和描述等也因無(wú)數(shù)據(jù)庫(kù)備份而無(wú)法還原。

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

參見:

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

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

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

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

僅用存儲(chǔ)目錄還原Gallery 2[ ]

如果除了g2data文件夾或g2data/albums/以外所有東西都沒有的話,那么回復(fù)含有全部圖片的整個(gè)相冊(cè)結(jié)構(gòu)還是很簡(jiǎn)單的。

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