LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2006, 05:34 AM   #1
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Appending files in star - strange behaviour


I'm probably doing something really stupid here, but I can't get star to append files reliably. I'm using star rather than tar because I want to save the security context info for SELinux in FC.

The following is a snippet from an incremental backup file I run, and this works fine (I tailored it in response to the problems I'll explain below).

(find /home -daystart -mtime -2 -print; \
find /root -daystart -mtime -2 -print; \
find /var/www -daystart -mtime -2 -print; \
find /etc -daystart -mtime -2 -print; \
find /storage/Samba -daystart -mtime -2 -print) | (star -xattr -H=exustar -r -acl list=- f="$DEST" -not pat=/storage/Samba/Backup_Exclude/\*)

However the following does not

find /home -daystart -mtime -2 -print | star -xattr -H=exustar -c -acl list=- f="$DEST"
find /root -daystart -mtime -2 -print | star -xattr -H=exustar -r -acl list=- f="$DEST"
find /var/www -daystart -mtime -2 -print | star -xattr -H=exustar -r -acl list=- f="$DEST"
find /etc -daystart -mtime -2 -print | star -xattr -H=exustar -r -acl list=- f="$DEST"
find /storage/Samba -daystart -mtime -2 -print | (star -xattr -H=exustar -r -acl list=- f="$DEST" -not pat=/storage/Samba/Backup_Exclude/\*)


All I'm trying to achieve is a backup of various data files from midnight yesterday (I'm planning to play with the start times once I get the basics correct).

The second version will add files from /home and /root, andf that is it. No errors are reported, and evewrything looks like it's working fine. However a star -t reveals only the first couple of lines add anything.

Strangely it has worked completely a couple of times (the -acl is there as an attempt to fix the problem and I'm not sure I need it).

Has anyone encountered anything similar?

Is it me or my version of star (star 1.5a54 (i386-redhat-linux-gnu)) or something else?

I can't see anything useful on the web, and I've tried -u (update) in place of -r (replace).

Thanks in advance
 
Old 05-02-2006, 10:23 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You reminded me that my backup was already long due... thanks.

I assume you can read man pages as well, so this might be a stupid statement, but it says:

Code:
example% find . find_options -print | star -c list=- f=/dev/rmt/1bn

Note that this does not work if the file names from output of the find command include new line characters.
That is the only thing I can think of...

Have you tried to redirect the output of find into a file and use this file with the list= command? Just for testing.

jlinkels
 
Old 05-02-2006, 10:49 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Original Poster
Rep: Reputation: 122Reputation: 122
No I hadn't. I'll give it a go. However, if I do each star individually using -c and a unique destination, it creates the file with the correct contents OK.

Have fun backing up
 
Old 05-05-2006, 12:13 PM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Today I created a number of directories in /tmp, like /tmp/1, /tmp/2 etc. In each directory I created some files, a,b,c, etc.

Then I used the backup commands as you posted them (the second set). It worked perfectly.

Did you use the -vv flag?



Code:
jlinkels@homeserv:~$ star -version
star: star 1.5a40 (i686-pc-linux-gnu)

jlinkels

PS. For my backup I use different archives, although for diff backups I put everything on one tape.
 
  


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
Strange Behaviour! joshuarowley LQ Suggestions & Feedback 1 12-08-2005 04:36 PM
core files appending PIDS - they shouldn't be! LavieX Linux - Enterprise 2 04-15-2005 03:26 PM
Appending Text Files From Bash Script alts Programming 3 11-18-2004 07:36 PM
[c] Appending to files using fopen() in mandrake wedamija Programming 4 11-01-2002 10:39 AM
Strange Behaviour mikeyt_3333 Linux - General 4 08-06-2001 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration