Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 02-16-2007, 12:15 PM   #1
LQ Newbie
Registered: Dec 2006
Location: chennai, India
Distribution: redhat & mandriva
Posts: 17

Rep: Reputation: 0
Question regarding backup script

i prepared a script to backup a files and directories for a user. It works well. But it displays the following message while running.

tar: removing leading / names

Is it really a error message ? I run the following bash script from root user.

#! /bin/bash


tar -uf /backup/a.tar $HOME

bzip2 -f /backup/a.tar
Old 02-16-2007, 12:21 PM   #2
Registered: Jun 2003
Location: Florida, USA
Distribution: Drake 10.1 Download
Posts: 182

Rep: Reputation: 30
The ultimate answer is to untar the file and see if everything untars and md5sums okay. However I think it's just stripping the leading "/" from filenames, but I'm not sure. FYI, I think you can use bzip2 as an ption to tar, like tar -j (if you don't want two separate commands).
Old 02-17-2007, 12:01 AM   #3
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 24, 25, RHL 5.2
Posts: 560

Rep: Reputation: 56
Not really an error, it is just telling you that it is removing the leading / from your directory when it stores it in the tar file. For example the path for /home/scooby/file.txt would be stored as home/scooby/file.txt. If you want to keep absolute names use the -P option. While you can use the -j option to create (-cjf) a bzipped tar file you cannot update (-uf) a compressed tar file.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
backup script kristof_v Linux - Software 4 10-11-2006 12:52 PM
backup script tommytomato Linux - General 6 09-22-2006 03:41 AM
Using CP in my backup script. Echo Kilo Programming 6 06-01-2005 09:43 AM
backup script nitaish Linux - General 1 04-22-2005 12:31 PM
What backup script do you use? buldir Linux - Software 1 04-12-2005 03:57 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration