MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "RecycleBin/fr",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "996": {
                "pageid": 996,
                "ns": 0,
                "title": "Recovering SME Server with lvm drives",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "==Recovering SME Server with lvm drives==\n\nThe purpose of this howto is to give to you the abilities to access to your data if the SME Server 8 is broken and can't start in a normal way.\nyou have several methods below, but all are done on a default Raid over LVM, therefore you might need to adapt to your configuration, if necessary. \n\nIf your issue concerns a grub issue, you should look to this [[Grub|wiki page]]\n\n\n===Method with the official SME Server CDROM ===\nI presume that your SME Server is on a RAID over LVM, otherwise you will have to adapt this HOWTO.\n\n* start the system with your official SME Server CDROM\n* give at prompt : '''linux rescue'''\n* set your language and your keyboard\n* set to '''no''' the start of network interfaces\n* set to '''continue''' the question about how the system is mounted in /mnt/sysimage\n* set to '''ok'''\n* give at prompt : \n chroot /mnt/sysimage\n su -\n\nNow you have successfully mounted your LVM and you are able to read your data in a chroot environment, you can save them on a usb disk\n\n* to exit\n exit\n exit\n halt\n\n===Method with SystemRescueCd===\n\n{{note box| We go to work with [http://www.sysresccd.org/SystemRescueCd_Homepage SystemRescueCd] which is a Linux system rescue disk available as a bootable CD-ROM or USB stick for administrating or repairing your system and data after a crash.[http://www.sysresccd.org/Download Download]. The goal is to get mounted your logical volumes on /mnt where you can save them on a usb disk.}}\n\nstart the system with your system rescue cd or you usb stick, choose your keyboard settings\n\nthen start the server X\n\n startx\n\nopen a terminal to verify if your raid is initiated.\n\n cat  /proc/mdstat\n\nif you are lucky the output will look like this\n\n # cat /proc/mdstat \n Personalities : [raid1] \n md99 : active raid1 sdb1[1] sda1[0]\n       104320 blocks [2/2] [UU]\n       \n md100 : active raid1 sdb2[1] sda2[0]\n       262036096 blocks [2/2] [UU]\n       \n unused devices: <none>\n\nso we need to launch the LVM\n\n vgchange -ay\n\nafterward if the LVM is launched without error messages, we can mount the LVM in /mnt\n\n mkdir /mnt/recover\n mount /dev/main/root /mnt/recover\n\n{{tip box|if you have a name of logical volume who is not '''/dev/main/root''', you can type this command for knowing all your logical volume, and adapt this to your configuration.}}\n\n lvdisplay\n\nNow you have successfully mounted your LVM and you are able to read your data on /mnt/recover, you can save them on a usb disk with the file browser for example.\n\n===Method ===\nLet\u2019s try starting the raid and see what we get:\n\n mdadm -E /dev/sdb1\n\nWhat \u201cmdadm -E /dev/sdb1\u201d command shows it is a part of a raid array, what level, how many members, etc.\n\n user@user-desktop:/mnt$ mdadm -E /dev/sdb2\n /dev/sdb2:\n          Magic : a92b4efc\n        Version : 00.90.00\n           UUID : 550e0406:c9ce50d2:825b32e4:4a9d3549\n  Creation Time : Sat Sep  8 12:15:29 2007\n     Raid Level : raid1\n  Used Dev Size : 1991936 (1945.58 MiB 2039.74 MB)\n     Array Size : 1991936 (1945.58 MiB 2039.74 MB)\n   Raid Devices : 2\n  Total Devices : 1\n Preferred Minor : 2\n    Update Time : Sat Sep  8 12:22:05 2007\n          State : clean\n Active Devices : 1\n Working Devices : 1\n Failed Devices : 1\n  Spare Devices : 0\n       Checksum : 22e3837f - correct\n         Events : 0.991\n      Number   Major   Minor   RaidDevice State\n this     0       8        2        0      active sync   /dev/sda2\n    0     0       8        2        0      active sync   /dev/sda2\n    1     1       0        0        1      faulty removed\n user@user -desktop:/mnt$\n\nWith it being a raid 1 we only need 1 member to start it.\n\nYou can also use any md device to assemble the array.  You need to make sure you are using an md device that isn't already in use, to check what isn\u2019t being used type:\n\n cat /proc/mdstat\n\nSo we have now found which md device we can use and for our example we will use \u201cmd8\u201d\n\nWhat we will do now is assemble and run the array:\n\n mdadm -AR /dev/md8 /dev/sdb2\n\nIf you are running other then raid1, you may need to include additional members from other drives:\n\n mdadm -AR /dev/md8 /dev/sdb2 /dev/sdd2 /dev/sde3\n\u2003\nNow see if the array is assembled:\n\n cat /proc/mdstat\n\nSee if it detects the physical volumes:\n\n user@user-desktop:~$ pvs\n  PV         VG   Fmt  Attr PSize PFree\n  /dev/md8   main lvm2 a-   1.88G 32.00M\n user@user-desktop:~$\n\nTo activate all known volume groups in the system:\n\n user@user-desktop:~$ vgchange main -a n\n  0 logical volume(s) in volume group \"main\" now active\n user@user-desktop:~$ vgchange main -a y\n  2 logical volume(s) in volume group \"main\" now active\n user@user-desktop:~$\n\nNow we should be able to mount the drive:\n\n user@user-desktop:~$ mount /dev/main/root /mnt/oldsmeserver/\n user@user-desktop:~$\n\nLooking good so let\u2019s show where our files are:\n\n user@user-desktop:~$ cd /mnt/oldsmeserver/\n user@user-desktop:/mnt/oldsmeserver$ dir\n aquota.group  boot     etc     lib         mnt      proc  selinux  sys  var\n aquota.user   command  home    lost+found  opt      root  service  tmp\n bin           dev      initrd  media       package  sbin  srv      usr\n user@user-desktop:/mnt/oldsmeserver$\n\nNow you have successfully assembled your array and able to recover your data.\n\nNotes:\n\n*If the existing system has lvs already installed and has a volume group called \"main\" there may be issues.\n\n*If you installed SME Server <7.0 your volume group will be different, to find out your volume group type:\n\n user@user-desktop:~$ vgdisplay\n  --- Volume group ---\n  VG Name               main \uf0df The Volume group name.\n  System ID\n  Format                lvm2\n [..]\n user@user-desktop:~$\n\n===Method with a ubuntu Cdrom===\nbased on http://www.linuxjournal.com/article/8874?page=0,0\n\non ubuntu (non lvm), install mdadm and lvm2, attach server drive, \n\nfind UUID's\n\n $ sudo mdadm --examine --scan  /dev/sdb1 /dev/sdb2\n ARRAY /dev/md2 level=raid1 num-devices=2 UUID=895293be:9cfa7672:f1761508:386417bc\n ARRAY /dev/md1 level=raid1 num-devices=2 UUID=10573599:841f46aa:4c068816:67364324\n\n\nadd ARRAY lines to mdadm.conf\n\n $ cat /etc/mdadm/mdadm.conf\n # mdadm.conf\n #\n # Please refer to mdadm.conf(5) for information about this file.\n #\n \n # by default, scan all partitions (/proc/partitions) for MD superblocks.\n # alternatively, specify devices to scan, using wildcards if desired.\n DEVICE partitions\n ARRAY /dev/md2 level=raid1 num-devices=2 UUID=895293be:9cfa7672:f1761508:386417bc\n ARRAY /dev/md1 level=raid1 num-devices=2 UUID=10573599:841f46aa:4c068816:67364324\n\n\nchecking\n\n $  sudo pvscan\n  PV /dev/md2   VG main   lvm2 [148.94 GB / 64.00 MB free]\n  Total: 1 [148.94 GB] / in use: 1 [148.94 GB] / in no VG: 0 [0   ]\n\nchecking\n\n $ sudo lvscan\n  ACTIVE            '/dev/main/root' [146.94 GB] inherit\n  ACTIVE            '/dev/main/swap' [1.94 GB] inherit\n\nmount, check and copy to safe location ...\n\n $ sudo mkdir /mnt/ga\n $ sudo mount /dev/main/root /mnt/ga\n $ sudo ls -la /mnt/ga/var/log/messages\n lrwxrwxrwx 1 root root 32 2010-03-24 18:00 /mnt/ga/var/log/messages -> /var/log/messages.20*\n\n<noinclude>[[Category:Howto]][[Category:Administration:Storage]]</noinclude>"
                    }
                ]
            },
            "1065": {
                "pageid": 1065,
                "ns": 0,
                "title": "RecycleBin",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "{{Languages}}\n===Problem===\n\nDeleted files in ibays or in users home directories on the server are lost forever.\n\n=== Scenario === \n\nThis has been a long known issue for network admins. Files stored on another computer/server. Accidentaly hit the DELETE key. Poof! Gone. Files aren't in the local Recycle bin on the local computer. This is especially frustrating for admins who map profile parts back to the server. The users desktop, documents, etc never find their way into the local recycle bin as the users expect.\n\n=== Enable Recycle Bin for ibays ===\n\n db accounts setprop ibayname RecycleBin enabled\n db accounts setprop ibayname KeepVersions enabled \n signal-event ibay-modify ibayname\n\nThe first property enables the Recycle Bin feature. The second property KeepVersions ensures that when a file is deleted with the same name as one that was previously deleted the latest deleted file will be called \u201cCopy #x of filename\u201d.\n\n=== Enable Recycle Bin for users ===\n\n db configuration setprop smb RecycleBin enabled\n db configuration setprop smb KeepVersions enabled\n\nExpand the template...\n\n /sbin/e-smith/expand-template /etc/samba/smb.conf\n\nRemember to restart service...\n\n /etc/rc7.d/S91smb restart\n\n{{Warning box|After making changes with the commands shown, you need to logoff your workstation and log back in again so those new access permissions are included in your login session. Recycle Bin will then function as expected.}}\n\nThe Recycle Bin folder will be created automatically the first time a file is deleted, so you will not see the folder until you delete something.\n\nAn admin can then go and retrieve the files on the server.\n\n=== Recycle Bin Locations ===\n\nFor ibays the Recycle Bin is located at:\n\n /home/e-smith/files/ibays/ibayname/files/Recycle Bin\n\nFor users the Recycle Bin is located at:\n\n /home/e-smith/files/users/username/home/Recycle Bin\n\n=== Automatic Cleaning Of Recycle Bin Content ===\n\nThe simple script below can be used to clean out the various Recycle Bins on a regular basis. \n\nNote that this script is setup to use the last changed file attribute to selectively deletes files after they have been in the Recycle Bin for 30 days.\n\nSetup the script to run either daily or weekly from cron.\n{{Tip box |msg= If after running the script you receive empty notification emails and you've checked the date flags of the files in the recycle bin and know that they should be removed, try changing the '-ctime' parameter to '-mtime'. [[bugzilla:7596]]\nYou can check the output by running this at the command prompt to see if any files are now being flagged for removal (you can adjust the number of days as you wish):\n\nfind /home/e-smith/files/users/*/home/Recycle\\ Bin/* -type f -mtime +30 -print }}\n<pre>\n#!/bin/bash\n\n# ensure finds includes hidden files in the Recycle Bins\nshopt -s dotglob\n\necho \"+------------------------------------------------------------------------------+\"\necho \"|                           Samba recycle-bin cleaner                          |\"\necho \"+------------------------------------------------------------------------------+\"\n\nURF=$(find /home/e-smith/files/users/*/home/Recycle\\ Bin/* -type f -ctime +30)\nif [ \"$URF\" !=  \"\" ]\nthen\n    printf \"| %-76s |\\n\" \"The following user recycle bin files were deleted:\"\n    IFS=$'\\n'\n    for file in $URF\n    do\n        printf \"| - %-74s |\\n\" \"$file\"\n        rm -f \"$file\"\n    done\nelse\n    printf \"| %-76s |\\n\" \"There were no old user recycle bin files to delete.\"\nfi\n\necho \"+------------------------------------------------------------------------------+\"\n\nIRF=$(find /home/e-smith/files/ibays/*/files/Recycle\\ Bin/* -type f -ctime +30)\nif [ \"$IRF\" !=  \"\" ]\nthen\n    printf \"| %-76s |\\n\" \"The following ibays recycle bin files were deleted:\"\n    IFS=$'\\n'\n    for file in $IRF\n    do\n        printf \"| - %-74s |\\n\" \"$file\"\n        rm -f \"$file\"\n    done\nelse\n    printf \"| %-76s |\\n\" \"There were no old ibays recycle bin files to delete.\"\nfi\n\necho \"+------------------------------------------------------------------------------+\"\n\nURD=$(find /home/e-smith/files/users/*/home/Recycle\\ Bin/* -type d -empty)\nif [ \"$URD\" != \"\" ]\nthen\n    printf \"| %-76s |\\n\" \"The following users recycle bin directories were deleted:\"\n    IFS=$'\\n'\n    for folder in $URD\n    do\n        printf \"| - %-74s |\\n\" \"$folder\"\n        rm -rf \"$folder\"\n    done\nelse\n    printf \"| %-76s |\\n\" \"There were no old user recycle bin directories to delete.\"\nfi\n\necho \"+------------------------------------------------------------------------------+\"\n\nIRD=$(find /home/e-smith/files/ibays/*/files/Recycle\\ Bin/* -type d -empty)\nif [ \"$IRD\" != \"\" ]\nthen\n    printf \"| %-76s |\\n\" \"The following ibays recycle bin directories were deleted:\"\n    IFS=$'\\n'\n    for folder in $IRD\n    do\n        printf \"| - %-74s |\\n\" \"$folder\"\n        rm -rf \"$folder\"\n    done\nelse\n    printf \"| %-76s |\\n\" \"There were no old ibays recycle bin directories to delete.\"\nfi\n\necho \"+------------------------------------------------------------------------------+\"\n</pre>\n\n=== Changing the Recycle Bin name ===\n\nYou can change the name of the recycle bin by making a copy of the template fragment into the templates-custom tree and making your modifications there.\n<ol></li><li>Create the proper folder structure:\n\n mkdir -p /etc/e-smith/templates-custom/etc/smb.conf/ibays\n\n</li><li>Copy the template fragment to the template-custom tree\n\n cp /etc/e-smith/templates/etc/smb.conf/ibays/10recyclebin /etc/e-smith/templates-custom/etc/smb.conf/ibays\n\n</li><li>Use any editor to make your changes in the copied file\n\n nano /etc/e-smith/templates-custom/etc/smb.conf/ibays/10recyclebin\nModifying this line:\n\n $ibay_vfs->{recycle}->{repository} = \"Recycle Bin\";\n\nto whatever you like for a name:\n\n $ibay_vfs->{recycle}->{repository} = \"Add your name here\";\n{{Tip box|You can make the recycle bin hidden by adding a dot as a first character of the recycle bin name}}\n\n</li><li>Now let the server take the necessary actions to have the changes reflected for all ibays (replace <nowiki><ibayname></nowiki> with the ibayname):\n\n signal-event ibay-modify <ibayname>\n</li></ol>\n\n\n----\n[[Category: Howto]]\n[[Category:Administration:File and Directory Access]]"
                    }
                ]
            }
        }
    }
}