Jump to content

Extension:DataDump/ar

From mediawiki.org
This page is a translated version of the page Extension:DataDump and the translation is 14% complete.
الدليل المرجعي لامتدادات ميدياويكي
DataDump
حالة الإصدار مستقر
تنفيذ قاعدة بيانات , صفحة خاصة
بيان Provides the Special page to generate/delete/download dumps
المؤلف/المؤلفون Paladox, Universal Omega
القائم/القائمون بالصيانة Miraheze system administrators
آخر إصدار continuous updates
MediaWiki >= 1.43.0
PHP 7.4+
تغييرات قاعدة البيانات نعم
Composer miraheze/data-dump
  • $wgDataDumpDisableGenerate
  • $wgDataDumpAllowRetries
  • $wgDataDumpLimits
  • $wgDataDumpDirectory
  • $wgDataDumpFileBackend
  • $wgDataDump
  • generate-dump
  • delete-dump
  • view-dump
Licence رخصة جنو العمومية 3.0 أو ما بعدها
التنزيل

يسمح امتداد DataDump للمستخدمين بطلب وتوليد قواعد البيانات. Other types of dumps, such as image dumps, can be configured in the extension. وهذا يسمح بتطبيق التصفيح بسهولة دون الحاجة إلى تدخل إداري النظام.

For reporting an issue or a bug, please use Miraheze Phorge. See here for the workboard.

Installation

  • Download وضع الملف/الملفات في دليل يحمل اسم ‎DataDump في مجلد ‎extensions/‎ لديك.
  • أضف الكود التالي في الجزء الأسفل من ملف LocalSettings.php :
    wfLoadExtension( 'DataDump' );
    
  • شغل نص التحديث البرمجي الذي سوف ينشئ تلقائيا جداول قاعدة البيانات الضرورية التي يحتاج إليها الامتداد.
  • Configure as required.
  • Yes تم التنفيذ – اذهب إلى Special:Version على موقع الويكي لديك كي تتحقق من أن الامتداد قد ثبت بنجاح.

Configuration

parameter default comment
$wgDataDump [] This config defines how dumps are generated and which types of dumps there are.
$wgDataDumpDirectory false This config defines the directory where to store the dumps.
$wgDataDumpDisableGenerate false This config determines whether DataDump should be disabled or not.
$wgDataDumpFileBackend false This config defines backend to use ($wgFileBackends)
$wgDataDumpInfo "" This config defines the information displayed atop Special:DataDump.
$wgDataDumpLimits ["memory": 0, "filesize": 0, "time": 0, "walltime": 0] This config defines resources allocated to running scripts.

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.

التصاريح comment
generate-dump Allows users to generate database dumps
view-dump Allows users to view dumps
delete-dump Allows users to delete dumps

Example

This is an example of how to set up the configuration. You can tailor it to your specific needs:

$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',
        ],
    ],
    'zip' => [
        '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',
        ],
    ],
];

Note that ${filename} is replaced internally in the extension so make sure that it is always in a single string not in a double string.

The limit parameter specifies how many dumps can be generated for that wiki.

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

إذا كان ملف السجل الخاص بك يحتوي على شيء مماثل: [exec] Possibly missing executable file: '/usr/bin/php'، فقد تحتاج إلى تعيين $wgPhpCli إلى قيمة صحيحة للبيئة الخاصة بك. يمكنك استخدام whereis php لتحقق مزدوج

Zip Tooling

إذا كان ملف السجل الخاص بك يحتوي على شيء يشبه: [exec] Possibly missing executable file: '/usr/bin/zip'، فستحتاج إلى التأكد من أن أدوات zip المناسبة لعملك مثبتة على جهاز المضيف الخاص بك.

See also