Extension:DataDump

This page is a translated version of the page Extension:DataDump and the translation is 64% complete.
MediaWiki manüel uzantıları
DataDump
Sürüm durumu: kararlı
Uygulama Veritabanı , Özel sayfa
Açıklama Dökümleri oluşturmak/silmek/indirmek için Özel sayfa sağlar
Yazar(lar) Paladox, Universal Omega
Sürdürücü(ler) Miraheze system administrators
En son sürüm continuous updates
MediaWiki >= 1.36.0
PHP 7.4+
Veritabanı değişiklikleri Evet
Composer miraheze/data-dump
Tablolar data_dump
Lisans GNU Genel Kamu Lisansı 3.0 veya üstü
İndir
  • $wgDataDumpDisableGenerate
  • $wgDataDumpInfo
  • $wgDataDumpDirectory
  • $wgDataDumpFileBackend
  • $wgDataDumpLimits
  • $wgDataDumpDownloadUrl
  • $wgDataDump
  • generate-dump
  • delete-dump
  • view-dump

DataDump allows users to request and generate database dumps. Other types of dumps, such as image dumps, can be configured in the extension. This allows for easy dumping without the need for system administrator intervention.

Bir sorunu veya hatayı bildirmek için lütfen Miraheze Phabricator kullanın. Çalışma panosu için buraya bakın.

Kurulum

  • Dosyaları İndir ve extensions/ klasörünüzdeki DataDump adlı dizine yerleştirin.
  • LocalSettings.php dosyanızın altına aşağıdaki kodu ekleyin:
    wfLoadExtension( 'DataDump' );
    
  • Bu uzantının ihtiyaç duyduğu gerekli veritabanı tablolarını otomatik olarak oluşturacak betik güncelleme komutunu çalıştırın.
  • Gerektiği gibi yapılandırın.
  •   Yapıldı – Uzantının başarıyla yüklendiğini doğrulamak için vikinizde Special:Version seçeneğine gidin.

Yapılandırma

parametre varsayılan yorum
$wgDataDump [] Bu yapılandırma, dökümlerin nasıl oluşturulduğunu ve ne tür dökümlerin olduğunu tanımlar.
$wgDataDumpDirectory false Bu yapılandırma, dökümlerin saklanacağı dizini tanımlar.
$wgDataDumpDisableGenerate false This config determines whether DataDump should be disabled or not.
$wgDataDumpFileBackend false Bu yapılandırma, kullanılacak arka ucu tanımlar ($wgFileBackends)
$wgDataDumpInfo "" Bu yapılandırma, Special:DataDump üzerinde görüntülenen bilgileri tanımlar.
$wgDataDumpLimits ["memory": 0, "filesize": 0, "time": 0, "walltime": 0] Bu yapılandırma, çalışan betiklerine ayrılan kaynakları tanımlar.

Permissions

DataDump provides three permissions. These allow you some granularity when it comes to configuring DataDump.

You are not restricted to only using these permissions to restrict who can download, view, or delete dumps. You can also use other permissions available on the wiki.

parameter comment
generate-dump Allows users to generate database dumps
view-dump Allows users to view dumps
delete-dump Allows users to delete dumps

Örnek

Bu, yapılandırmanın nasıl kurulacağına dair bir örnektir. Özel ihtiyaçlarınıza göre uyarlayabilirsiniz:

$wgDataDumpDirectory = "/var/backups/${wgDBname}/";

$wgDataDump = [
    'xml' => [
        'file_ending' => '.xml.gz',
        'generate' => [
            'type' => 'mwscript',
            'script' => "$IP/maintenance/dumpBackup.php",
            'options' => [
                '--full',
                '--output',
                "gzip:${wgDataDumpDirectory}" . '${filename}',
            ],
        ],
        'limit' => 1,
        'permissions' => [
            'view' => 'view-dump',
            'generate' => 'generate-dump',
            'delete' => 'delete-dump',
        ],
    ],
    'image' => [
        'file_ending' => '.zip',
        'generate' => [
            'type' => 'script',
            'script' => '/usr/bin/zip',
            'options' => [
                '-r',
                "${wgDataDumpDirectory}" . '${filename}',
                "$IP/images/"
            ],
        ],
        'limit' => 1,
        'permissions' => [
            'view' => 'view-dump',
            'generate' => 'generate-dump',
            'delete' => 'delete-dump',
        ],
    ],
];

${file} uzantı içinde dahili olarak değiştirildiğine dikkat edin, bu nedenle her zaman çift dizede değil tek bir dizede olduğundan emin olun.

Limit parametresi, o viki için kaç tane döküm oluşturulabileceğini belirtir.

Troubleshooting

If you're experiencing issues with failed data dumps, you can look at your Job Queue 's log file. You can search for DataDumpGenerateJob to find an area where the Job Queue is running your dump.

PHP binary location

If your log file contains something similar: [exec] Possibly missing executable file: '/usr/bin/php', then you might need to set $wgPhpCli to a correct value for your environment. You can use whereis php to double check.

Zip Tooling

If your log file contains something similar to: [exec] Possibly missing executable file: '/usr/bin/zip' then you need to ensure the appropriate zip tooling for your job is installed on your Host machine.

Ayrıca bakınız