Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

backup website linux

Posted on 2013-05-21
3
Medium Priority
?
329 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses

609 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