Koozali.org: home of the SME Server
Obsolete Releases => SME Server 6.x => Topic started by: Frank VB on December 19, 2006, 03:33:43 PM
-
Hello
I know a little bit about Linux commands but I'm new to SME server. I have a SME 6.0 server with a 40 GB drive which is almost completely filled up. I've read that you can purge the SARG report files, located at /var/www/html/squid, (which eat up a lot of disk space). How do I this? Log in as root, browse to the folder and execute a delete command?
Are there any other (log) files that I can delete safely? Is there a command to defrag the hard drive?
Thanks for your help.
Frank
-
What I normally do is take a backup of the data then delete within the daily/weekly/monthly directories, you can do this using the rm command but do take care using it have a go on a test box first and type man rm at command to see the different syntax;s
-
Thanks. Ultimately I did the following:
1. First I navigated to the daily log folder:
cd /var/www/html/squid/daily
Note: you should log in with the root account.
2. I archived all the subfolders and files in the daily folder into a file named "daily.2003.tar.gz" with the command:
tar zcvf daily.2003.tar.gz ./2003*-2003*
I repeated step 2 for every year that I wanted to archive. Actually I archived the years 2003 and 2004. So:
tar zcvf daily.2004.tar.gz ./2004*-2004*
2. I then moved all the resulting tar files to my home folder:
mv 2003*.tar.gz -v /home/e-smith/files/users/[myusername]/home/squidlogs/daily
mv 2004*.tar.gz -v /home/e-smith/files/users/[myusername]/home/squidlogs/daily
Note: You should substitute [myusername] with your user account. Also, be sure to first create a folder squidlogs with a subfolder daily before executing the move command!
3. It is advisable that you also backup the index.html files in the daily, weekly and monthly folders. You can simply copy those files. For example:
cp index.html /home/e-smith/files/users/[myusername]/home/squidlogs/daily
4. You can move the tar files to an external or local hard drive.
5. Finally, I removed all the original files in the /var/www/html/squid/daily folder with:
rm -rf 2003*
rm -rf 2004*
6. I did the same thing in the weekly and monthly folders. As a result I gained approximately 3.3 G of hard disk space (which is a lot on a 40 G disk)!
I hope this will help other people with cleaning up their hard disks.
Frank