Made a link from domlogs to another partition.. how to remov

fog

Well-Known Member
Jun 22, 2002
164
0
166
I followed the wrong guide posted here I guess. I went into the domlogs dir... killed httpd... made a link to /home2/domlogs and restarted apache... was hoping this would stop my /usr partition from filling up, but the /usr partition still grows so the guide posted here was wrong.

What I would like to do is remove the link and follow one of the other guides posted here.

Please help.. I just don't know the command to kill the link.

Here is what I did...

mkdir /home2/domlogs
stop httpd
ln -s /usr/local/apache/domlogs /home2/domlogs
start httpd

How do I undo it and what would be the proper way to accomplish this?
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
You were so close.

mkdir /home2/domlogs
stop httpd
cd /usr/local/apache/domlogs
tar -cvf domlogs.tar *
mv domlogs.tar /home2/domlogs
cd ..;rm -R domlogs
ln -s /home2/domlogs /usr/local/apache/domlogs
cd /usr/local/apache/domlogs
tar -xvof domlogs.tar
start httpd
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
I attempted to follow the below, but am left with one issue. Please help.

mkdir /home2/domlogs DONE
stop httpd DONE
cd /usr/local/apache/domlogs DONE
tar -cvf domlogs.tar * DONE
mv domlogs.tar /home2/domlogs DONE

cd ..;rm -R domlogs
Do I want to delete the files within domlogs or just remove the entire directory? It prompts me for this info.

ln -s /home2/domlogs /usr/local/apache/domlogs
cd /usr/local/apache/domlogs
tar -xvof domlogs.tar
start httpd
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Once you've done the tar and moved it, verify that it does exist in the new directory. When you do the rm -R reply yes or use rm -Rf

I have tested this thoroughly as I also have my domlogs somewhere else.

Also your bad, locate the the bad link you should see it in /home2/domlogs/ All you have to do is rm it.