Extension:DataDump/hi

Category:GPL licensed extensions/hi
मीडियाविकि एक्सटेंशन मैन्युअल
DataDump
प्रकाशन की स्थिति: स्थिरCategory:Stable extensions/hi
कार्यान्वयन डेटाबेस Category:Database extensions/hi, विशेष पृष्ठ Category:Special page extensions/hi
विवरण डम्प्स बनाने/हटाने/डाउनलोड करने के लिए एक विशेष पृष्ठ बनाता है
लेखक Paladox, Universal Omega
अनुरक्षक Miraheze system administrators
नवीनतम संस्करण continuous updates
MediaWiki >= 1.43.0
PHP 7.4+
डेटाबेस बदलता है हाँ
Composer miraheze/data-dumpCategory:Extensions supporting Composer/hi
टेबल data_dump
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 3.0 या अधिक
डाउनलोड करें Category:Extensions in GitHub version control/hi
  • $wgDataDumpDisableGenerate
  • $wgDataDumpLimits
  • $wgDataDumpDirectory
  • $wgDataDumpFileBackend
  • $wgDataDump
  • generate-dump
  • delete-dump
  • view-dump
Category:All extensions/hi

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.

किसी बग या समस्या को रिपोर्ट करने के लिए कृपया Miraheze Phabricator का इस्तेमाल करें। कार्यपटल के लिए यहाँ देखें।

स्थापना

  • फ़ाइलों को डाउनलोड करें और अपने extensions/ फ़ोल्डर के DataDump नामक डिरेक्ट्री में डालें।
  • अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
    wfLoadExtension( 'DataDump' );
    
  • अपडेट स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
  • आवश्यकतानुसार कॉन्फ़िगर करें।
  • Yes पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।

कॉन्फ़िगरेशन

पैरामीटर डिफ़ॉल्ट टिप्पणी
$wgDataDump [] यह कॉन्फ़िग बताता है कि डम्प्स को कैसे बनाया जाता है और कितने प्रकार के डम्प्स उपलब्ध होंगे।
$wgDataDumpDirectory false यह कॉन्फ़िग बताता है कि डम्प्स को किस डिरेक्ट्री में रखा जाएगा।
$wgDataDumpDisableGenerate false This config determines whether DataDump should be disabled or not.
$wgDataDumpFileBackend false यह कॉन्फ़िग प्रयुक्त बेक-एंड बताता है ($wgFileBackends)
$wgDataDumpInfo "" यह कॉन्फ़िग Special:DataDump के ऊपर दिखाई जाने वाली जानकारी बताता है।
$wgDataDumpLimits ["memory": 0, "filesize": 0, "time": 0, "walltime": 0] यह कॉन्फ़िग स्क्रिप्ट्स चलाने के लिए संसाधन परिभाषित करता है।

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

उदाहरण

यह एक उदाहरण है जहाँ दिखाया गया है कि कॉन्फ़िगरेशन को कैसे सेटअप करना है। आप इसे बदलकर अपनी ज़रूरतों से अनुकूल बना सकते हैं:

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

ध्यान रखें कि ${filename} को आंतरिक रूप से एक्सटेंशन में बदल दिया जाता है तो हमेशा सुनिश्चित करें कि यह एक एकल-स्ट्रिंग है न कि दोहरा-स्ट्रिंग।

limit पैरामीटर बताता है कि उस विकि के लिए कितने डम्प्स बनाए जा सकते हैं।

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.

ये भी देखें

Category:Extensions by Miraheze/hi
Category:All extensions/hi Category:Database extensions/hi Category:Extensions by Miraheze/hi Category:Extensions in GitHub version control/hi Category:Extensions included in Miraheze/hi Category:Extensions included in WikiForge/hi Category:Extensions supporting Composer/hi Category:GPL licensed extensions/hi Category:LoadExtensionSchemaUpdates extensions/hi Category:Special page extensions/hi Category:Stable extensions/hi