Solved

Debian Linux Apache2

Posted on 2012-03-11
6
398 Views
Last Modified: 2012-03-25
I tarred up the Sites-enabled and Sites-available directories and to move this to a new debian server.  How can I untar them to the existing  directory?  When I decompress they make a second directory under these.  

Also, will moving these directories be enough to move the web app from apache?  

Or could I use like rsync to make an exact replica of the server?

Thanks in advance!

Jackson
0
Comment
Question by:Jack_son_
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:farzanj
Comment Utility
It really depends upon how you have created your tar.  If you have included sub folders, they would be created if you untar it.

The important thing was to preserve permissions and perhaps the full paths as well.

Did you tar with permissions like
tar pcvf  tarfile.tar folder_to_be_tarred

First check your archive

tar tvf tar_filename.tar

This will show you what tarred.  If you untar, you will get all the folders that are contained in your archive.  Sort of answer your question?
0
 

Author Comment

by:Jack_son_
Comment Utility
i use just pcv, but I could re-tar it.  When i untar it on the new folder it makes a directory under the sites-available called sitesavailable and then the sites are in there.  

How can I untar or move these websites to the sites-available directory?

Or how can i move these sites to the other directory?

Also, is it possible to just tar the entire apache2 directory and replace the one on the new server with this one?

Thanks for your help,

Jackson
0
 
LVL 31

Expert Comment

by:farzanj
Comment Utility
If I understand you correctly, all you need to is to move everything one directory level above

 mv maindir ..
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:Jack_son_
Comment Utility
yes
0
 

Author Comment

by:Jack_son_
Comment Utility
i actually got it tarred up but when i decompress it, it returns an error.  the file size is about 1 gb
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
Comment Utility
Are you just untarring it or uncompressing as well?  A simple tar archive is not compressed, just an archived file.

Did you try
tar tvf tarfile.tar
?

Is it just tar or tar.gz (tgz)? tar.bz2?

If you cannot see the contents, then it might be corrupted.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now