Recover Wordpress from unbootable Ubuntu box - wordpress

After rebooting a Wordpress Dev machine (Ubuntu Desktop), does not boot at all.
I can ping the machine, but cannot access it using SSH. I recon the SSH Daemon doesn't start properly.
Is there a way of recovering the Wordpress site from a dead machine? I have access to the filesystem by attaching it to another machine.

Depend on your Linux architecture, but you can certainly copy the files for your Wordpress installation. Usually files are in /var/www/....
Additionnaly you need to backup your database, if you have no means to access it throught SSH, you cannot use the SQL dump capability. You can try recovering raw database files wich are usually under /var/lib/*sql (for PostGreSQL database this is /var/lib/pgsql or /var/lib/mysql for MySQL database).
Once your database is backuped you need to use the exact same SQL engine and copy the files to the new database folder (be extr cautious with files permissions).

Related

Duplicating wordpress database for local environment using Laragon

I'm trying to create a local development environment to test website changes out in. The web developers I'm working with have a gitlab repo of the website with auto DevOps where changes are pushed to the production/stage sever when commited.
I downloaded Laragon and was able to serve pages locally, then I cloned the gitlab repo into my root directory.
How do I get a copy of production website's database and then connect it to my local development environment with laragon? I tried to duplicate the database on production with WP all-in-one migration but there are read/write restrictions.
I was advised the following: "I would recommend copying the database onto your local MariaDB/MySQL server the Laragon provides. You'd need to get a dump of the database from the server using SSH command line tools and then you can use the phpMyAdmin interface provided by Laragon to upload the dump".
I wasn't able to SSH from the windows command line, but I could SSH into the server using Putty, however, how am I able to transfer the file to my local windows machine? If I'm logged into my server wouldn't the file just be placed somewhere in the file system of the remote machine, so I wouldn't be able to use it with Laragon.
If you are using Laragon Full, you have ssh/scp command in Laragon's Terminal. So you can get your-sql-dump from your remote server easily.
Here's how:
Open Laragon's Terminal:
Menu > Laragon > Terminal
Run this command:
scp user#your-remote-host:/path-to-your-sql-dump C:/laragon/tmp/your-sql-dump
Import your sql-dump to your local database:
mysql -u root -p your-database < C:\laragon\tmp\your-sql-dump
Reference: https://laragon.org/download/migrate-from-xampp.html
That's all.

existing umbraco cms set up in local server

I am completely new with the umbraco CMS and one of my client want to make some changes on his umbraco CMS web site. So i have downloaded the umbraco CMS projects files and database from the server and i need to configure it on my local server. I am using windows 10 OS. I can install a fresh umbraco cms in the local server. But When i try to run the existing in local server, its asking me for install the fresh umbraco CMS.Can anyone help me on sort out this issue?
Note : I don't have changed the any configurations on the files. Just simply running the project with Microsoft WebMatrix app. Please help me with the database and other configuration settings also.
Aby help will be really appreciated...
It sounds like the Umbraco installation is assuming it is a new installation and then creates a new database for you.
You need to download the website files directly from the server and place those in a folder which can be served by a webserver on your local machine. Then you need to get a backup of the database on the server and restore this on a SQL server on your local machine.
When this is done, you need to make sure the connectionstring in the web.config of the site is set up correct to match where you have restored the database on your local SQL server. Search for umbracoDbDsn and make sure the server name, credentials and database name is correct.
When this is done, you should be able to start up the site and hopefully it will run just as it did on the server.

how to make a postgres backup on servers which run on linux/windows

i am creating a web application in asp.net with database on postgres. i have successfuly created a database backup by putting the destination of database backup on the webconfig file. the web application succesfully creates backups when published on windows server, however i was wondering if the server is changed to linux the destination folder would be invalid.what could be the solution for it to work on different OS??
another problem is that the postgres installation could be on any drive in linux whereas rightnow in my webapplication i open the system diagnostics to run the pgdump command using the info.filename="C:\Program Files\PostgreSQL\9.3\bin\" + commandType + ".exe ";
anyone has solution for multiOS database backup for postgres using asp.net?? is there any solution to this??
You can continue to use your backup scripts on Windows. pg_dump will happily connect to the remote database on the Linux box. E.g.
pg_dump -h my_linux_server ....
I strongly suggest reading the PostgreSQL docs on backup/restore. Consider setting up PITR in addition to periodic dumps. I'd recommend running PgBarman on the Linux server (archiving to an external drive, NAS, or network share) for point-in-time recovery, plus periodic dumps to the Linux box.
See: http://www.postgresql.org/docs/current/static/backup.html

how to backup the sql file for wordpress in microsoft azure cloud?

i installed a word press blog in Microsoft azure using the image from new ->website >gallery
it was easy but now i want to take a backup of my .sql file of word press i cant see any phpadmin access and the database is automatically created when i used it install from gallery and also when i navigate to sql database in portal i cant find any databases and my website is running fine how is it so ?
how to access the database and download the backup ?
thanks for your time
I am not that familiar with WordPress, but my experience tells me that this would be your best a reliable choice to back up your WordPress database.
As for phpMyAdmin and other stuff - you can always connect to your Azure Website using FTP. You can do whatever you want with the content, once connected with the FTP client of your choice (understand - you can upload your version of phpmyadmin and have it there running for you).
You can always access MySQL database using the connection string provided on your website's dashboard in Azure management ("View connection strings"). Then you can use program like MySQL Workbench (or perhaps even phpMyAdmin on your local machine) to access the database.
Backing up from MySQL workbench is quick and easy, see e.g.Making a MySQL database backup with MySQL Workbench. Remember to also back up files.

syncing local development branch with remote branch

How do people usually work with managing remote stuff with local stuff? Say I have an EC2 instance running ubuntu and my dev machine is an OS X. I have a symfony2 project in it. Do people usually work with files directly on the remote server on EC2? If yes how do they use a text editor such as sublime text on an EC2 box?
I cannot say how "people" work. But to me the best practice is following:
Remote:
Install mysql & php incl. all extensions are needed. (symfony-project/web/config.php)
You could use this tutorial: http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3
Create Database for your project on server
Clone your git repository on server and define WebHook URLs
Create the file on your server. <?php git pull ?>
You'll never work on remote directly from now on! (except installing vendors by ssh)
Local:
Install local webserver. I recommend http://php-osx.liip.ch/ But you can also use MAMP (don't like that).
Clone git repository in web folder
Define remote Database in symfony project
See changes local
Commit&Push will pull remote automatically

Resources