LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-31-2007, 11:22 AM   #1
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Rep: Reputation: 30
tar backup of an XP directory


I have a dual boot system: linux and XP. As root I mounted XP with:
mount /dev/sda1 /mnt/windows
In the config for my backup script I have
DOS_C_BK_DIR=
Documents\ and\ Settings/Ed\ H/My\ Documents/

The error messages that I get when trying to backup XP are:

Backing Up
Documents\ and\ Settings/Ed\ H/My\ Documents/ on hebrews-Mar-31-07.win_c.tgz
tar: Documents\\: Cannot stat: No such file or directory
tar: and\\: Cannot stat: No such file or directory
tar: Settings/Edward\\: Cannot stat: No such file or directory
tar: Heaney/My\\: Cannot stat: No such file or directory
tar: Documents: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

Any suggestions?
 
Old 03-31-2007, 11:37 AM   #2
Jordi
LQ Newbie
 
Registered: Mar 2007
Location: Barcelona
Distribution: CentOS
Posts: 11

Rep: Reputation: 0
I think I would be possibly a quotation problem in DOS_C_BK_DIR variable definition.
Man bash, section Quotation
 
Old 03-31-2007, 03:39 PM   #3
dugas
Member
 
Registered: Jul 2004
Location: louisiana
Distribution: fedora 4/kubuntu
Posts: 116

Rep: Reputation: 15
Quotation Problem in backup script

You probably need to put quotations around your variable when calling tar.
Try something like:

Code:
#!/bin/bash

DOS_C_BK_DIR=A\ Test\ Directory

tar -cf test.tar "$DOS_C_BK_DIR"
 
  


Reply

Tags
debian


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
tar: how to extract only one directory from a backup guarriman Linux - General 1 01-29-2007 10:35 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
tar backup & restore of current directory wishbone42 Linux - General 3 02-09-2004 02:30 AM
tar: How do I backup everything !! grantm Linux - Newbie 3 07-30-2003 02:41 PM
Using tar to backup a directory and subdirs n1wil Linux - General 1 08-07-2002 10:32 PM


All times are GMT -5. The time now is 04:31 AM.

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