Solved

backup website linux

Posted on 2013-05-21
3
324 Views
Last Modified: 2013-05-30
Hello,
I normally backup my website by doing this

tar czf html.tar.gz html

I would like to know if its possible to ignore files *.jpg and *.avi

I am using centos.
0
Comment
Question by:XK8ER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
santoshmotwani earned 500 total points
ID: 39186600
--exclude=*.jpg --exclude=*.avi

at above command at the end of the command
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 39187000
don't want points, here, but quote or escape the * if you want to be on the safe side

if your tar version does not have the --exclude option as in many versions of gnutar, you can use find to generate the file list for tar
0
 
LVL 5

Expert Comment

by:1ly4me
ID: 39193608
Also if you have list of files to exclude , you can use -X option.
Ex.
tar czf html.tar.gz -X exclude.txt html

Open in new window

0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

740 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