LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 02-16-2007, 11:15 AM   #1
ramesh_manu
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

clear

tar -uf /backup/a.tar $HOME

bzip2 -f /backup/a.tar
 
Old 02-16-2007, 11:21 AM   #2
registering
Member
 
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-16-2007, 11:01 PM   #3
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
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.

Bill
 
  


Reply


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 11:52 AM
backup script tommytomato Linux - General 6 09-22-2006 02:41 AM
Using CP in my backup script. Echo Kilo Programming 6 06-01-2005 08:43 AM
backup script nitaish Linux - General 1 04-22-2005 11:31 AM
What backup script do you use? buldir Linux - Software 1 04-12-2005 02:57 PM


All times are GMT -5. The time now is 04:59 PM.

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