Jump to content

Server set up with Direct Admin


ibaker

Recommended Posts

Posted (edited)

I have a dedicated server in LA that currently has 2 Invision forum sites and a CS Cart shopping cart site:
recreationalflying.com
socialaustralia.com.au
clearprop.com.au

It uses Centos and nginx but no control panel or email services. I also use Cloudfare for domains and Amazon Web services for email. This server was set up for me as I have limited server management experience having always used cPanel. However I have a need to do basic things myself like I did when I used cPanel.

What I need is for someone to back up my sites off the server, my hosting company will then reinstall standard centos and Direct Admin (Direct Admin is free for me), then set up the server without nginx but with all the extra things that are needed, hardening, elasticsearch, php modules etc like the server is now, set up email so I don't need AWS any more, no nginx and put my sites back on and make sure they are working and back online.

I basically want my server with Centos, Direct Admin and email all set up but NOT use nginx or AWS any more.

Is anyone interested and if so let me know an approx cost...thanks

Edited by ibaker
Posted

At first to backup your sites' files and databases from terminal use the commands:

Database backup:

mysqldump -u database_username -p database_name > site_database.sql

Fill in the "database_username" with the site's database username, "database_name" with the site's database name and the "site_database" with the name of the exported database.

Compress files:

tar -zcvf site_files.tar.gz /path/to/files/folder/

Fill in the "/path/to/files/folder/" the path of the site's folder e.g. /var/www/domain.com/html/

When you're ready, download databases and files to your PC.

Then, when your hosting company reinstall CentOS 7 with Direct Admin, you can go through this guide and complete the necessary steps.

Finally, to restore your sites, simply upload the .tar.gz compressed files to the site's public folder and uncompress. To restore database you can go through phpMyAdmin or via terminal with the bellow command in the folder with the uploaded databases:

mysql -u database_username -p database_name < site_database.sql

 

Posted
40 minutes ago, Ioannis D said:

Database backup:

mysqldump -u database_username -p database_name > site_database.sql

 

Cue emojis potentially becoming question marks...

Use this instead:

 

mysqldump -u database_username -p database_name --default-character-set=utf8mb4 > site_database.sql

 

Posted

At first glance backup and restore scripts might look daunting, but the process is actually quite straightforward once you see it in action. It's pretty much a matter of substituting place holder values with values pertinent to your unique environment.  

I would recommend reaching out directly to your hosting provider.  Ask them if they can recommend someone to assist you in backing up and restoring your server and provide you with a set of scripts you can use going forward. 

Posted

The backing up and restoring is not an issue, it's setting up everything else. Just reading the setup of Centos and Direct Admin guide link above that loses me. I need php, mysql, mail, elasticsearch etc and anything else that is needed as well all done

Posted (edited)

@Nathan Explosion I've been using this for forever, probably since around 2005 but still seems to work.

How would I add the character set into it so it works? Or should I just change to your version? I prefer the smaller gz file size to download and keep

mysqldump --opt --user=db_username --password=db_password db_name | gzip > ./public/05apr.sql.gz

 

Edited by marklcfc
Posted

You might consider reaching out to your members asking for recommendations.  They might know someone from their own personal networks that could assist you.

Many service providers host forums that you might check out to see if anyone could recommend an admin.  One of the challenges you will face is creating an implementation that isn't using software that is close to its end of life and setting everything up to be secure.  Some server configurations allow for upgrading and installing various needed software components and tweaking settings and some don't. 

The cheaper the server the less configuration you are apt to be allowed to do.  An experienced admin may have some tricks up their sleeves to deal with various roadblocks, but they might not be able to deal with some server configurations and provide the kind of results you will want.  

 

Posted (edited)
5 minutes ago, marklcfc said:

I've been using this for forever, probably since around 2005 but still seems to work.

No reason why it won't work - all it's doing is a backup. But something that a lot of people don't do is verify their backups are good for when they actually need them, that's when you know if it did indeed work.

Anyway... adding a character set to it is simply a matter of adding it in like I did in the previous post

--default-character-set=utf8mb4

 

 

Edited by Nathan Explosion
Posted
mysqldump --opt --user=db_username --password=db_password db_name --default-character-set=utf8mb4 | gzip > ./public/05apr.sql.gz

Like this?
Should the character set be present on a restore too?

  • 2 weeks later...
Posted

Yes - you just add what I mentioned into whatever your existing working command is.

On 4/7/2022 at 9:58 AM, marklcfc said:

Like this

 

On 4/7/2022 at 9:58 AM, marklcfc said:

Should the character set be present on a restore too?

Doubt it - but google it to find out if it is a required element though.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...