Link to home
Start Free TrialLog in
Avatar of Alan
AlanFlag for New Zealand

asked on

WebSite Backup Zip - How to use locally

Hi All,

I am reasonably au fait with computers and IT in general, but not so much with web servers.

I have been given a zip file backup of our website by the developer, and I would like to set it up on my Ubuntu 16.04 LTS machine so that I can 'have a play' (this won't go back into production or be exposed to the internet - it is just that I am interested).

I have setup Apache2, MySQL, PHP, and PHPMyAdmin on my machine, and it is all (seemingly) working fine with my 'Hello World' (index.php) sitting in /var/www/html/.

However, I don't know where to go from here, and I am not really sure if I am asking the question in the right place!

Not sure if it helps, but the root of the zip files contains this (ls -la):

drwxrwxrwx 1 root root   2408 Aug  1 15:18 .
drwxrwxrwx 1 root root  12288 Aug  1 15:18 ..
drwxrwxrwx 1 root root      0 Mar  8 10:57 app
-rwxrwxrwx 1 root root   1646 Mar  8 10:57 artisan
drwxrwxrwx 1 root root      0 Mar  8 10:57 bootstrap
-rwxrwxrwx 1 root root   1548 Mar  8 10:57 composer.json
-rwxrwxrwx 1 root root 151002 Mar  8 10:57 composer.lock
drwxrwxrwx 1 root root      0 Mar  8 10:57 config
drwxrwxrwx 1 root root      0 Mar  8 10:57 database
-rwxrwxrwx 1 root root   6148 Mar  8 10:57 .DS_Store
-rwxrwxrwx 1 root root     61 Mar  8 10:57 .gitattributes
-rwxrwxrwx 1 root root    113 Mar  8 10:57 .gitignore
-rwxrwxrwx 1 root root    567 Mar  8 10:57 gulpfile.js
-rwxrwxrwx 1 root root    402 Mar  8 10:57 package.json
-rwxrwxrwx 1 root root    930 Mar  8 10:57 phpunit.xml
drwxrwxrwx 1 root root      0 Mar  8 10:57 public
-rwxrwxrwx 1 root root   2208 Mar  8 10:57 readme.md
drwxrwxrwx 1 root root      0 Mar  8 10:57 resources
drwxrwxrwx 1 root root      0 Mar  8 10:57 routes
-rwxrwxrwx 1 root root    563 Mar  8 10:57 server.php
drwxrwxrwx 1 root root      0 Mar  8 10:57 storage
drwxrwxrwx 1 root root      0 Mar  8 10:57 tests
-rwxrwxrwx 1 root root    115 Mar  8 10:57 update.sh
-rwxrwxrwx 1 root root 147042 Mar  8 10:57 yarn.lock

Open in new window


The /public/ directory contains:

drwxrwxrwx 1 root root    0 Mar  8 10:57 .
drwxrwxrwx 1 root root 2408 Aug  1 15:18 ..
drwxrwxrwx 1 root root    0 Mar  8 10:57 build
drwxrwxrwx 1 root root    0 Mar  8 10:57 css
-rwxrwxrwx 1 root root 6148 Mar  8 10:57 .DS_Store
-rwxrwxrwx 1 root root    0 Mar  8 10:57 favicon.ico
drwxrwxrwx 1 root root    0 Mar  8 10:57 fonts
-rwxrwxrwx 1 root root  553 Mar  8 10:57 .htaccess
drwxrwxrwx 1 root root    0 Mar  8 10:57 img
-rwxrwxrwx 1 root root 1782 Mar  8 10:57 index.php
drwxrwxrwx 1 root root    0 Mar  8 10:57 js
-rwxrwxrwx 1 root root   24 Mar  8 10:57 robots.txt
-rwxrwxrwx 1 root root  914 Mar  8 10:57 web.config

Open in new window



Can anyone point me to how to fire this up locally on my machine?

Thanks,

Alan.
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Generally, you restore database then content and then reconfigure web application to point to new database
Avatar of Alan

ASKER

Hi Shaun,

I am completely new to this, but I tried the following:

I logged into PHPMyAdmin (http://localhost/phpmyadmin) and went into 'databases', then 'import', where it says that the database may be zipped, so I searched inside the zip file I have for another zip inside, but there is none in there.

I also searched for anything with 'sql' in the filename anywhere, and nothing was found.

Are you able to describe in more detail what I am looking for, and how to restore the database?

Thanks,

Alan.
One of two things, either web app doesn't use database or the person didn't include it in the files given to you
Avatar of Kimputer
Kimputer

Wow I have a feeling this will be a LONG thread. Maybe make it a Gig? Or ask for Live support?
Sooooooo many things to do:

find the db backup, import db, set correct credentials.
adjust hosts file to point to that server (if website designed to take only that hostname)
There are a lot of possible small changes that need to be done.
Avatar of Alan

ASKER

Hi,

It could be I am over-reaching here!

Not sure if it will shed any light, but there is a file (/config/database.php) that I have attached.

It contains about eight references to 'sql' in various places.

Does that provide any useful info?

Thanks,

Alan.
Avatar of Alan

ASKER

Hi Guys,

I think it has been built using Laravel which depends on Composer.

The file (composer.json) contains the following:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "doctrine/dbal": "^2.5",
        "laravelcollective/html": "^5.3",
        "guzzlehttp/guzzle": "^6.2",
        "drawmyattention/xerolaravel": "^1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.0",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/Alan3285-ChangedThis-Alan3285/helpers.php",
            "app/Cms/helpers.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

Open in new window


I obfuscated the only thing that looked specific in there using my EE username, but all else is untouched.

Alan.
Avatar of Alan

ASKER

I am going to do some research on Laravel, but please feel free to let me know your thoughts - in particular, has the developer 'forgotten' to include the database file(s) in what they have given us?

Thanks,

Alan.
Avatar of Alan

ASKER

Hi,

I think I failed to attached the database.php file I mentioned above, so here it is.

Thanks,

Alan.
database.php
Avatar of Alan

ASKER

Hi All,

Just an update:

I am currently down the rabbit hole with Laravel which is the overall system that has been used.

I am in over my head, but i'll see what I can work out.

I'll post back once I have more knowledge and can narrow down the question.

Thanks,

Alan.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.