Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tar Backup Not Working Properly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gmcle454
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 173
Location: U.S. - Virginia

PostPosted: Wed Jun 02, 2004 5:39 am    Post subject: Tar Backup Not Working Properly Reply with quote

I'm having a problem with automating a basic backup using tar. I am using the backup tip found here (near the bottom of the page).

Basically I'm referencing a file I created that is named etc/backup.conf. It contains a list of files and folders that I want tar to backup (called by "-T" after the tar command).

For some reason none of the folders are backing up. All of the specific files listed in backup.conf are tared perfectly fine, only folders are not working. What should the proper syntax be for listing folders in the backup.conf file?

Here is my /etc/backup.conf file.
Code:
/etc/passwd
/etc/group
/etc/make.conf
/etc/lilo.conf
home


Here's what I get whe actually running the tar command:
Code:
Workstation-1 / # tar -cjf /data/Backup/'+%Y-%m-%d.tar.bz2' -T /etc/backup.conf
tar: Removing leading `/' from member names
tar: home : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Substituting `.' for empty member name
tar: : Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

_________________
Ged tha mi bochd tha mi uasal; buidheachas do Dhia is ann de chlann 'Ill Eathain mi.
Back to top
View user's profile Send private message
speeding
n00b
n00b


Joined: 13 May 2004
Posts: 14
Location: Europe

PostPosted: Wed Jun 02, 2004 9:12 am    Post subject: Reply with quote

Hello.

Seems like tar doesn't like the last line of your "backup.conf".
Try "/home" instead of "home" and add "EOF" as the last line (meaning End Of File).
Back to top
View user's profile Send private message
gmcle454
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 173
Location: U.S. - Virginia

PostPosted: Wed Jun 02, 2004 4:32 pm    Post subject: Reply with quote

There were several (12) blank lines in the backup.conf file which threw the cannot stat errors. So I deleted all empty lines and added the /before the home directory. But now it thinks that EOF is a file that should be backed up. What am I doing wrong on that line?

Now my backup.conf file looks like this:
Code:
/etc/passwd
/etc/group
/etc/make.conf
/etc/lilo.conf
/home/
EOF


Now it outputs this:
Code:
tar: Removing leading `/' from member names
tar: EOF: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors


Now, when I tar, everything gets backed up fine, it just thinks that EOF is a file that needs to be backed up.
_________________
Ged tha mi bochd tha mi uasal; buidheachas do Dhia is ann de chlann 'Ill Eathain mi.
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Wed Jun 02, 2004 6:39 pm    Post subject: Reply with quote

gmcle454 wrote:
There were several (12) blank lines in the backup.conf file which threw the cannot stat errors. So I deleted all empty lines and added the /before the home directory. But now it thinks that EOF is a file that should be backed up. What am I doing wrong on that line?

Now my backup.conf file looks like this:
Code:
/etc/passwd
/etc/group
/etc/make.conf
/etc/lilo.conf
/home/
EOF


Now it outputs this:
Code:
tar: Removing leading `/' from member names
tar: EOF: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors


Now, when I tar, everything gets backed up fine, it just thinks that EOF is a file that needs to be backed up.


Try taking out the EOF again?
_________________
My blog
nvtuner software - enhance your AGP Geforce 6800 or 6200!
Back to top
View user's profile Send private message
gmcle454
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 173
Location: U.S. - Virginia

PostPosted: Wed Jun 02, 2004 8:08 pm    Post subject: Reply with quote

BINGO! :lol: :lol: :lol: :lol: :lol: :lol:

That did the trick! Thanks!

Is there anyway to put comment lines in this type of file? just using # dosen't work.
_________________
Ged tha mi bochd tha mi uasal; buidheachas do Dhia is ann de chlann 'Ill Eathain mi.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum