1

I need to transfer all of the log files off of a server and hope someone can help me. I'm pretty stuck.

The directory and file structure is like so.

/var/www/vhosts/site1.com/statistics/logs/access_log* /var/www/vhosts/site2.com/statistics/logs/access_log* /var/www/vhosts/site3.com/statistics/logs/access_log* /var/www/vhosts/site4.com/statistics/logs/access_log*

I need to tar all of the domain folders and only the files that start with access_log.

Thanks for the help.

2 Answers 2

0

Is this a Plesk server, if yes be careful about using /tmp as it could be a small partition.

I use: tar -cvf /var/logs.tar /var/www/vhosts//statistics/logs/access_log

You can then compress the logs with gzip, bzip2, or whatever other zip program you want to use.

gzip /var/logs.tar

0
0

cd /var/www/vhosts; tar cjf /tmp/logs.tar.bz2 */*/*/access_log*

1
  • If this is a plesk box, those wild cards would grab other folders as well. Feb 20, 2010 at 0:32

You must log in to answer this question.