LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-25-2013, 04:56 PM   #1
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Backing up Windows Vista using Linux


I have backed many Windows systems in the past using Linux. Today is the first time I am attempting a Windows Vista system.

Apparently, Windows Vista uses symlinks all over the place, and they are symlinks to fully qualified pathnames (generally this is a very bad idea IMHO - not the symlinks, but the fully qualified pathname part). For example, if I go to /mnt/sdb2/Users, I see things like "All Users -> /mnt/sdb2/ProgramData"

So when backing up "Users" via
Code:
cp -av "/mnt/sdb2/Users/" .
, I have many symlinks to a fully qualified pathname, which includes the mountpoint, "/mnt/sdb2". Well, in the future if I mount this backup, the mountpoint may not be /mnt/sdb2, and then all the symlinks will be dead. Is there some way to have the "cp" command convert to relative symlinks rather than fully qualified pathname symlinks? For now, I am just using
Code:
cp -LRv --preserve=all "/mnt/sdb2/Users/" .
which follows the symlinks rather than leaving them in place. I don't like this, but at least it gets all the files copied instead of a bunch of possibly dead symlinks. When did Windows start using symlinks anyway? I didn't think it was smart enough for this (indeed, it is not smart enough to use relative pathnames evidently). Not to mention that having "c:\Users\All Users -> c:\ProgramData" is a kind of brain-damaged symlink naming/use convention IMHO.

I was just wondering about this Windows symlink thing. In the past, on older versions of Windows, I don't remember every running into symlinks. I was only planning on backing up c:\Users, but with these new symlinks pointing to who-knows-where in Windows, I may need to backup all of c:\ instead. For all I know, there may be some symlink buried deep under c:\Users that points to c:\Windows. A backup of the entire disk is not what I originally wanted to do.
 
Old 12-26-2013, 03:28 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,363

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
I tried this in the past, and it ended in tears because linux incorrectly translated some names. Keep tar out of it.
the cp command to use is
Quote:
cd /mnt/sdb2
cp -av /somedir .
That way, you don't get /mnt/sdb2 in the pathname. I would give consideration to restoring, and backing up. It would be easy to end up with an unrestorable backup. Also bear in mind that if you change filesystem type at any stage, you may have difficulty preserving permissions. If you copy to ext4 and back, it will try to set the ext4 permissions on return.
 
  


Reply



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
Can't access folders in Windows after backing up with Linux skapunker Linux - General 2 11-09-2011 06:16 PM
Issue with sliding windows (backing up windows client to Linux media agent) jrembish Linux - Newbie 1 05-14-2010 07:15 AM
Backing up from Vista to Ubuntu Server Froman2686 Linux - Server 3 12-03-2008 10:31 PM
Backing up files on Windows boxes to Linux thosm Linux - Software 1 04-08-2004 06:36 PM
Backing up Windows stuff into Linux anon003 Linux - Newbie 5 07-23-2003 01:51 PM

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

All times are GMT -5. The time now is 11:54 AM.

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