Can I use the full site tar.gz backup from shared site in my local PC server

ozstar

New Member
Joined
Jan 4, 2020
Messages
13
Reaction score
3
Credits
73
Hi,

Can I use the tar.gz full site backup from shared host in my local server?

I would like to have a local backup of all my shared sites on my local apache Linux PC (Zorin)

If so, what is the best way for em to unravel the zip so it all falls into place in the correct folder.

Thank you
 


Puppy Linux used to have that capacity (downloading an entire webpage or site) so I know it can be done. Used to use the app to backup my own website, when I had one. It was Slacko 5.7, I believe. It's gotta be available somewhere else, too! Wasn't a tar.gz file however.
 
Can I use the tar.gz full site backup from shared host in my local server?

There isn't really a one size fits answer to this question.
First what flavor of linux? Second what web server? Third, are you using any other extensions
or software to make your site run (php, javascript, mongoDB, mySQL, postgreSQL or a dozen
other packages).
 
Yes that's usually the way it goes isn't it!

I am using Zorin 15 and Apache, MySQL, ,PHPmyadmin etc. Not Lampp or Xampp packages but the standalone scripts.

Most of these sites use php, php, db etc so definitely need these.

Rather than ftp down all the sites public_html folders, I was thinking of using the tar backup file that is generated in Cpanel and used when migrating from one server to another. It has the email, dbs' and everything all setup, so it would be easier, in theory anyway.

I found a program HTTrack Website Copier so will try that too, although I guess downloading is much like FTP.

Anyway, many thanks for the help.

oz
 
I remember what it is now -- pmirrorget -- in Puppy Tahrpup (and others). It may be downloaded onto a LiveCD and used to download an entire website. Look above -- 'Download Linux' -- it's there if you want it.
 
'Usually' (but not always) apache likes to live in /var/www/html
If you backup this directory you should get most of the web content.
You should do a dump on the database that includes both the schema and the data, back this up
as well. The config files for apache are 'usually' in /etc/apache or /etc/httpd, it's a good idea to grab these. phpmyadmin depends on the distro, I'm not sure about Kali, but I'm guessing
even if it's not in /var/www/html that you have a link to there.

Assuming the above locations are correct.. you would run something like...

tar cvf mycoolwebsite.tar /var/www/html /etc/httpd /var/lib/mysql/data/db-dump-20200526.sql

Where mycoolwebsite.tar is the name of your tar file.
/var/www/html is where your web content is.
/etc/httpd is where your web config files are.
and /var/lib/mysql/data/ is where your database got dumped to.

These directories may not be 100% correct for Kali, but it should get you close.

Theorectically, install a new server, install apache/php and install mysql
untar your file and away you go. In some cases the user names may not match up.
(some distro's run as apache, some run as httpd for example)
so you may have to chown these directories after they are untar'red.
 

Members online


Latest posts

Top