Topic on Project:Support desk

How to install old backup?

8
Johnywhy (talkcontribs)

How to install old backup?

I'm not sure if this is a backup generated by MediaWiki, by an MW plugin, or by the webhost.

How to install on a new host?

The directory top level looks like this:

Volume in drive C has no label.

Volume Serial Number is 24DB-CF61

Directory of C:\Users\johna\OneDrive\Documents\Guns\New Install 1-30-2021\Unzip\mw19.421_78457.2021-02-06_04-22-32

02/04/2023  02:14 PM    <DIR>          .

01/26/2023  08:47 AM    <DIR>          ..

02/01/2021  12:20 AM    <DIR>          tests

02/01/2021  12:20 AM    <DIR>          skins

02/01/2021  12:20 AM    <DIR>          resources

02/01/2021  12:20 AM    <DIR>          cache

01/31/2021  03:44 PM    <DIR>          cgi-bin

02/01/2021  12:20 AM    <DIR>          mw-config

02/01/2021  12:58 AM    <DIR>          maintenance

02/01/2021  12:20 AM    <DIR>          languages

02/01/2021  12:20 AM    <DIR>          vendor

02/01/2021  12:20 AM    <DIR>          includes

02/03/2021  04:39 AM    <DIR>          images

02/01/2021  12:20 AM    <DIR>          docs

02/03/2021  01:26 PM    <DIR>          extensions

11/04/2019  11:39 PM                95 FAQ

12/18/2020  05:08 AM         1,151,718 HISTORY

02/04/2023  02:15 PM                 0 dir.txt

12/18/2020  05:08 AM             8,245 img_auth.php

12/18/2020  05:08 AM            13,101 CREDITS

12/18/2020  05:08 AM             1,977 index.php

12/18/2020  05:08 AM             3,581 INSTALL

11/04/2019  11:39 PM            19,421 COPYING

11/04/2019  11:39 PM               102 composer.local.json-sample

12/18/2020  05:08 AM             1,951 load.php

02/05/2021  09:12 AM            13,780 LocalSettings.php

12/18/2020  05:08 AM             4,752 composer.json

12/18/2020  05:08 AM               168 CODE_OF_CONDUCT.md

02/06/2021  04:22 AM             2,249 mw19.421_78457.2021-02-06_04-22-32

12/18/2020  05:08 AM             4,610 opensearch_desc.php

03/20/2018  04:32 PM                22 phpinfo.php

12/18/2020  05:08 AM             1,525 README.md

12/18/2020  05:15 AM            90,300 RELEASE-NOTES-1.35

12/18/2020  05:08 AM           156,532 autoload.php

12/18/2020  05:08 AM               998 rest.php

11/04/2019  11:39 PM               199 SECURITY

12/18/2020  05:08 AM             4,490 api.php

02/06/2021  04:23 AM         1,633,146 softperms.txt

02/06/2021  04:22 AM         2,666,914 softsql.sql

02/02/2021  06:03 PM               108 .htaccess

12/18/2020  05:08 AM            23,539 thumb.php

12/18/2020  05:08 AM             1,439 thumb_handler.php

12/18/2020  05:08 AM            12,142 UPGRADE

12/18/2020  05:08 AM             1,428 jsduck.json

              29 File(s)      5,818,532 bytes

              15 Dir(s)   9,859,399,680 bytes free

Bawolff (talkcontribs)
This post was hidden by Johnywhy (history)
Johnywhy (talkcontribs)

softsql.sql appears to be a full dump. Trying now.

Johnywhy (talkcontribs)

@Bawolff

- Do i simply run the following in mysql admin?

mysql -u wikidb_user -p wikidb < dump_of_wikidb.sql

- Create an empty db first?

- Should i get old username/pw from backup? Where?

Bawolff (talkcontribs)

You can check the sql file to see if it creates the database (see if it has a line like CREATE DATABASE, somewhere near the beginning after the SETs).

The username/password is for your db server. It might not be the same as the one for the old site. The old site db username/password would be in LocalSettings.php (look for $wgDBname, $wgDBpass )

Johnywhy (talkcontribs)

Thx! Here's the beginning of the sql file. As you can see, it's a Softaculous backup. That scares me. I'm worried something will fail. Is it a MediaWiki .sql file? Or a Softaculous .sql file? Same thing?

It appears there's no CREATE, so i believe i need to create a new db. To avoid any changes to the .sql file, i assume i should use the same db name for the new db. And ensure the username/pw match the values in LocalSettings.php


-- Softaculous SQL Dump

-- http://www.softaculous.com

--

-- Host: localhost

-- Generation Time: February 6, 2021, 4:22 am

-- Server version: 10.3.27

-- PHP Version: 7.3.6


SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8mb4 */;


--

-- Database: `gunsywtx_retort`

--


-- --------------------------------------------------------


--

-- Table structure for table `account_credentials`

--


CREATE TABLE `account_credentials` (

Bawolff (talkcontribs)

So yes, it probably wants you to create the database first.

The format is a mysql dump file. This is a pretty standard way to backup a database.

the first table in what you posted is namdd account_credentials. That is not a table name mediawiki uses, but it could be a mediawiki extension, or possibly the db backup has both mediawiki and non mediawiki things.

Keep the file around. If something goes wrong you can always start over and try again.

Reply to "How to install old backup?"