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": "RoundCube_Configuration",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> 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": {
            "566": {
                "pageid": 566,
                "ns": 0,
                "title": "Replace ssh with Qnapware OpenSSH",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Tested on:\n\n*TS-453 Pro, Firmware 4.2.0\n\nRecommend changing QNAP system sshd to use any port other than 22. &nbsp;(Like 2222 or something)\n\n#Install [http://wiki.qnap.com/wiki/Debian_Installation_On_QNAP QNAPware] for opkg support (Note: This replaces both Entware and Optware)\n#opkg install openssh-server\n#echo 'export PATH=/Apps/opt/bin:/Apps/opt/sbin:$PATH' >> /etc/profile # Optional, but recommended\n#ssh-keygen -f /Apps/opt/etc/ssh/ssh_host_rsa_key -N ''-t rsa''\n#ssh-keygen -f /Apps/opt/etc/ssh/ssh_host_dsa_key -N ''-t dsa''\n#ssh-keygen -f /Apps/opt/etc/ssh/ssh_host_ecdsa_key -N ''-t ecdsa''\n#ssh-keygen -f /Apps/opt/etc/ssh/ssh_host_ed25519_key -N ''-t ed25519''\n#useradd --system --no-create-home sshd\n#ln -s ../init.d/openssh.sh /etc/init.d/S86openssh\n#ln -s ../init.d/openssh.sh /etc/rcK.d/K34openssh\n#Create /etc/init.d/openssh.sh\n<div style=\"background:#eee;border:1px solid #ccc;padding:5px 10px;\"><pre><nowiki>#!/bin/sh\n\nSSH=/Apps/opt/sbin/opensshd\nSSHD_CONF=/Apps/opt/etc/ssh/sshd_config\n\n/sbin/test -f $SSHD || exit 0\n\n[ -f \"/bin/cmp\" ] || ln -sf /bin/busybox /bin/cmp\n\nDEFAULT_SSH_PORT=`/sbin/getcfg LOGIN \"SSH Port\" -d 22`\nSSH_PORT=22\nSSHKEY_CONFIG_DIR=/etc/config/ssh\ncase \"$1\" in\n    start)\n        /bin/chmod 0640 /etc/config/shadow* /etc/default_config/shadow\n        if [ `/sbin/getcfg LOGIN \"SSH Enable\" -u -d TRUE`&nbsp;!= FALSE ]; then\n                echo -n \"Starting OpenSSH (opensshd) service: \"\n                /sbin/daemon_mgr opensshd start \"$SSH -f ${SSHD_CONF} -p $SSH_PORT\"\n                echo \"OK\"\n                touch /var/lock/subsys/opensshd\n        fi\n\n       &nbsp;;;\n    stop)\n        echo -n \"Shutting down OpenSSH (opensshd) service: \" \n        /sbin/daemon_mgr opensshd stop $SSH\n        /usr/bin/killall opensshd 2>/dev/null\n        rm -f /var/lock/subsys/opensshd\n        echo \"OK\"\n       &nbsp;;;\n\n    restart)\n        $0 stop\n        $0 start\n       &nbsp;;;      \n    *)\n        echo \"Usage: /etc/init.d/openssh.sh {start|stop|restart}\"\n        exit 1\nesac\n\nexit 0\n</nowiki></pre>\n</div>\nFinally, <code>/etc/init.d/openssh.sh start</code>&nbsp;to get up and running.\n\nOptionally, if you'd like users other than admin to log in with authorized_keys:\n\n#Edit /Apps/opt/etc/ssh/sshd_config, set&nbsp;AuthorizedKeysFile to /opt/home/%u/.ssh/authorized_keys\n#mkdir -p /opt/home/someuser/.ssh\n#<span style=\"line-height: 20.8px;\">mkdir -p /opt/home -m 755</span>\n\n<span style=\"line-height: 20.8px;\">Run these for every user you want to be &nbsp;(replace someuser with your actual username):</span>\n\n#mkdir -m 700&nbsp;-p /opt/home/someuser/.ssh\n#touch&nbsp;<span style=\"line-height: 20.8px;\">/opt/home/someuser/.ssh/authorized_keys</span>\n#<span style=\"line-height: 20.8px;\">chmod 600&nbsp;/opt/home/someuser/.ssh/authorized_keys</span>\n\n\u200b\n[[Category:SSH]]"
                    }
                ]
            },
            "250": {
                "pageid": 250,
                "ns": 0,
                "title": "Replicate iSCSI LUN",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "For the advanced iSCSI (for Intel x86-based models with firmware 3.2.0 or later), below instruction shows you how to replicate the iSCSI targets and LUNs from one to another, and can successfully run the replicated iSCSI targets on the backup NAS. \n\n<br> \n\n'''Before Getting Started:''' \n\n- Assume you have the A NAS as the source (10.8.12.111), and B NAS as the destination/backup (10.8.12.12), and the iSCSI LUNs are located in MD0_data \n\n- Make sure there's no connection on the source iSCSI targets (better make it offline) - This is my own notes, so use it your own risk. \n\n- This requires some basic console knowledge \n\n<br> \n\n'''To Replicate the LUNS:''' \n\na. Mount a NFS share on NAS B via CLI \n<pre># mount -t nfs 10.8.12.111:/share/MD0_data/.@iscsi.img /share/Public/LUN_temp</pre> \nb. Copy the LUNs from NAS A to NAS B (or you can use rsync as well). Note that the \".@iscsi.img\" folder will only be created if you have ever created any LUN, therefore, if you can't find this directory or if you have never created the LUN on the destination (NAS B), please create one first, and then you can remove it right away.&nbsp; \n<pre># cp --sparse=always /share/Public/LUN_temp/* /share/MD0_data/.@iscsi.img/</pre> \nc. Copy the configuration file (iscsi_trgt.conf) from NAS A to NAS B, it's under /etc/config/. \n\nd. Disable the iSCSI target and then enable it, then you should be able to connect it via your initiator. \n\n<br> \n\n'''Remark (using Remote Replication):''' \n\nThere are still some other ways to back up the LUNs to another NAS, for example, using Remote Replication. But here are some prerequisites if you want to do it via the web GUI: \n\n1. You have to create the new share folder (e.g. MyLUN) on the source NAS for temporary use, and then change its path to the directory where iSCSI LUNs are stored by editing the share folder property. \n\n2. Also create a share folder (e.g. BackupLUN) on the destination NAS, and do just like what you have done in the previous step. Note that the \".@iscsi.img\" folder will only be created if you have ever created any LUN, therefore, if you can't find the directory, please create one first, and then you can remove it right away. \n\n3. Simply create a new remote replication job on the source NAS, set \"BackupLUN\" as the destination path, and use \"MyLUN\" as the source path. \n\n''* Please make sure you have enabled the \"Handle sparse files efficiently\" option in the job settings. This option is available since 3.2.5 (but is being included in 3.2.4 natively)''\n\n4. After the replication job has been finished, following the step C &amp; D in the previous section, copy the configuration file from A to B, and then restart the iSCSI target on NAS B, and you should be able to use it. \n\n<br> \n\nNote that this (rsync) might take more time than using copy (cp)&nbsp; \n\n[[Category:ISCSI]]"
                    }
                ]
            }
        }
    }
}