View previous topic :: View next topic |
Author |
Message |
gmcle454 Apprentice
Joined: 10 Mar 2004 Posts: 173 Location: U.S. - Virginia
|
Posted: Wed Jun 02, 2004 5:39 am Post subject: Tar Backup Not Working Properly |
|
|
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 |
|
|
speeding n00b
Joined: 13 May 2004 Posts: 14 Location: Europe
|
Posted: Wed Jun 02, 2004 9:12 am Post subject: |
|
|
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 |
|
|
gmcle454 Apprentice
Joined: 10 Mar 2004 Posts: 173 Location: U.S. - Virginia
|
Posted: Wed Jun 02, 2004 4:32 pm Post subject: |
|
|
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 |
|
|
vonhelmet l33t
Joined: 06 Apr 2004 Posts: 770 Location: Somewhere in a school
|
Posted: Wed Jun 02, 2004 6:39 pm Post subject: |
|
|
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 |
|
|
gmcle454 Apprentice
Joined: 10 Mar 2004 Posts: 173 Location: U.S. - Virginia
|
Posted: Wed Jun 02, 2004 8:08 pm Post subject: |
|
|
BINGO!
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 |
|
|
|