Hi SuSE folks, Just received my SuSE 8.2 distro. Planning on an upgrade. Want to do a new install because I want to change partition sizes and loacations, Running a dual boot system with two hard drives, hda is Windoze and hdb is Linux. Want to create a separate "home" partition for future upagrades on hdb. Am trying to copy my "home" partition to the windoze "F" drive on hda so I can reinstall my stuff after I configure the hdb drive. Tried two ways. Both unsuccessful. Both as root. First graphically, dragging from /home to /windows/F. (fat 32) Copies ALL of the directotries but NONE of the files. Seems to stop dead in it's tracks because a file cannot be copied. Second, command line: ex: cp -p /home/bob /windows/F get a message cp: omitting directory "/home/bob" or if I cd higher into "home" and I do a cp -p /bob /windows/F, I get this response: cp: cannot stat '/bob' no such file or directory. I know it is some simple stupid thing that I am doing wrong. Can somebody please get me on the right track? Bob S.
* Bob S. (usr@sanctum.com) [030510 23:53]: ->Hi SuSE folks, -> ->Just received my SuSE 8.2 distro. Planning on an upgrade. Want to do ->a new install because I want to change partition sizes and ->loacations, -> ->Running a dual boot system with two hard drives, hda is Windoze and ->hdb is Linux. Want to create a separate "home" partition for future ->upagrades on hdb. Am trying to copy my "home" partition to the ->windoze "F" drive on hda so I can reinstall my stuff after I ->configure the hdb drive. Tried two ways. Both unsuccessful. Both as ->root. -> ->First graphically, dragging from /home to /windows/F. (fat 32) Copies ->ALL of the directotries but NONE of the files. Seems to stop dead in ->it's tracks because a file cannot be copied. -> ->Second, command line: ex: cp -p /home/bob /windows/F ->get a message cp: omitting directory "/home/bob" or if I cd higher ->into "home" and I do a cp -p /bob /windows/F, I get this response: ->cp: cannot stat '/bob' no such file or directory. -> ->I know it is some simple stupid thing that I am doing wrong. ->Can somebody please get me on the right track? Why not tar up your home directory instead of all of /home? Log in as root and cd in /home then "tar cvf bob.tar bob" then copy the tar file over to the Windows partition. You can then copy it back over and just untar it..."tar -xvf bob.tar" into your new /home partition. :) -- Ben Rosenberg ---===---===---===--- mailto:ben@whack.org The IQ and the life expectancy of the average American recently passed each other going in the opposite direction.
On Sunday 11 May 2003 02:56, Ben Rosenberg wrote:
* Bob S. (usr@sanctum.com) [030510 23:53]: ->Hi SuSE folks, -> ->Just received my SuSE 8.2 distro. Planning on an upgrade. Want to do ->a new install because I want to change partition sizes and ->loacations, ...................<snip a buncha stuff>...............
Why not tar up your home directory instead of all of /home?
Log in as root and cd in /home then "tar cvf bob.tar bob" then copy the tar file over to the Windows partition. You can then copy it back over and just untar it..."tar -xvf bob.tar" into your new /home partition. :)
OK Ben, Thanks for the advice, but like O'Smith stated in a later post; I am not sure I want to just restore/overwrite my entire home directories. ( 3 users). Afraid I might break something from the new install. Would rather pick & choose what I want to put back. eg: I have a really old intall of OO (build 641 I think) that I would NOT want to reinstall/overwrite. You stated in a later post to O'Smith that you used to untar to /tmp. I think that is what I would prefer to do even though it is a real PITA. Would you still tar it the same way as you sugested and then untar it to /tmp? Thanks, Bob S.
-- Ben Rosenberg ---===---===---===--- mailto:ben@whack.org The IQ and the life expectancy of the average American recently passed each other going in the opposite direction.
Le Dimanche 11 Mai 2003 09:04, Bob S. a écrit :
Second, command line: ex: cp -p /home/bob /windows/F get a message cp: omitting directory "/home/bob" or if I cd higher
You must add -R flag. This realizes a recursive copy of directories. But Ben's method in previous post is better. There is one file and thus copy is really faster.
into "home" and I do a cp -p /bob /windows/F, I get this response: cp: cannot stat '/bob' no such file or directory. ^error no need of '/'
Franz
On Sunday 11 May 2003 04:21, Franz Knuts wrote:
Le Dimanche 11 Mai 2003 09:04, Bob S. a écrit :
Second, command line: ex: cp -p /home/bob /windows/F get a message cp: omitting directory "/home/bob" or if I cd higher
You must add -R flag. This realizes a recursive copy of directories.
But Ben's method in previous post is better. There is one file and thus copy is really faster.
into "home" and I do a cp -p /bob /windows/F, I get this response: cp: cannot stat '/bob' no such file or directory.
^error no need of '/'
Franz ================
Ben & Franz, I have a question now since the discussion mentions tar. Well actually I have two, but I'll put them both in one. ;o) If you do tar your home, as you mention, will that also gather up all the dot files (hidden) as well and when you bring the tar file back to decompress, will it overwrite all those newly created duplicate files & directories or error out? Patrick -- --- KMail v1.5.1 --- SuSE Linux Pro v8.2 --- Registered Linux User #225206 On any other day, that might seem strange...
* O'Smith (penguin0601@earthlink.net) [030511 05:29]: ->I have a question now since the discussion mentions tar. Well actually ->I have two, but I'll put them both in one. ;o) -> ->If you do tar your home, as you mention, will that also gather up all ->the dot files (hidden) as well and when you bring the tar file back to ->decompress, will it overwrite all those newly created duplicate files & ->directories or error out? -> What I use to do prior to having a CDR is to tar up my home directory..do the work I needed to do and then untar it in /tmp so that I could move the files and directories over that I needed. It's a bit of a PITA but if there is something new that needs not to be overwritten then it helps. Other wise if one tars up the "bob" directory in this case then untars it over the skel bob directory that's created when the new install is done it should overwrite those files. Then the user should have the same setup as before. It's really a matter of taste as far as how it's done. -- Ben Rosenberg ---===---===---===--- mailto:ben@whack.org The IQ and the life expectancy of the average American recently passed each other going in the opposite direction.
On Sunday 11 May 2003 14:20, Ben Rosenberg wrote:
* O'Smith (penguin0601@earthlink.net) [030511 05:29]:
->I have a question now since the discussion mentions tar. Well actually ->I have two, but I'll put them both in one. ;o) -> ->If you do tar your home, as you mention, will that also gather up all ->the dot files (hidden) as well and when you bring the tar file back to ->decompress, will it overwrite all those newly created duplicate files & ->directories or error out? ->
What I use to do prior to having a CDR is to tar up my home directory..do the work I needed to do and then untar it in /tmp so that I could move the files and directories over that I needed. It's a bit of a PITA but if there is something new that needs not to be overwritten then it helps. Other wise if one tars up the "bob" directory in this case then untars it over the skel bob directory that's created when the new install is done it should overwrite those files. Then the user should have the same setup as before. It's really a matter of taste as far as how it's done.
Ok, thanks Ben & Thomas for your descriptive replies to the second part of my question. I guess I should have asked two questions afterall, as only part of two in one question was addressed. ;o) Will the tar procedure get all the hidden dot files as well? There are many config directories and file directories in one's home that are hidden (ex: .gnome), so those will be important to get also. Thanks, Patrick -- --- KMail v1.5.1 --- SuSE Linux Pro v8.2 --- Registered Linux User #225206 On any other day, that might seem strange...
* O'Smith (penguin0601@earthlink.net) [030511 14:41]: -> ->Will the tar procedure get all the hidden dot files as well? There are ->many config directories and file directories in one's home that are ->hidden (ex: .gnome), so those will be important to get also. Yes, it should get everything in the directory your tarring up. -- Ben Rosenberg ---===---===---===--- mailto:ben@whack.org The IQ and the life expectancy of the average American recently passed each other going in the opposite direction.
On Sunday 11 May 2003 07:27, O'Smith wrote:
On Sunday 11 May 2003 04:21, Franz Knuts wrote:
Le Dimanche 11 Mai 2003 09:04, Bob S. a écrit :
Second, command line: ex: cp -p /home/bob /windows/F get a message cp: omitting directory "/home/bob" or if I cd higher
You must add -R flag. This realizes a recursive copy of directories.
But Ben's method in previous post is better. There is one file and thus copy is really faster.
into "home" and I do a cp -p /bob /windows/F, I get this response: cp: cannot stat '/bob' no such file or directory.
^error no need of '/'
Franz
================
Ben & Franz, I have a question now since the discussion mentions tar. Well actually I have two, but I'll put them both in one. ;o)
If you do tar your home, as you mention, will that also gather up all the dot files (hidden) as well and when you bring the tar file back to decompress, will it overwrite all those newly created duplicate files & directories or error out?
Patrick
Here's a quick how-to for newbie backups: It's generally not a good idea to backup using absolute paths. If you were to issue the following command: % tar c /home/bob . When you decompress the tarred backup, it will do one of two things: - generate the "new" filesystem structure on a system without the bob user in /home or - replace the already existing /home/bob directory an subdirectories with the backup files. So let's say you are on a new system and want some of the files in this archve. If you decompress it......you now have overwritten any terminal, kde, mail, or other configurations that you might have already had on this computer. It's always better to do the following options: % tar cvfC "/usr/local/backups/archive{`date +%D`}.tar" /home/bob . This states the following: - create an archive (c) - be verbose about output (v) - specify the archive (f) - change the current working directory (C) - specifies the location and name of the archive as called by the "f" function ("/usr/local/backups/archive{`date +%D`}.tar") - specifies the directory to chdir into and call cwd (/home/bob) - specifies what files to "feed" into our archive (.) - all of them This has the following advanteages: You can specify the backup directory. You can implement the date structure into your backups - man date for available arguments. And you will not happen to write over any files accidentally because you have used relative paths in the creation of this archive. BTW...you may notice that these the arguments and functions are in a particular order. This is by design. i.e. the "f" function is the first one needing a argument...thus we place it's argument first. The "C" function is next...as is its argument...so on...and so forth. Happy backing up! -- Thomas Jones Linux-Howtos Administrator
On Sunday 11 May 2003 15:21, Thomas Jones wrote:
..................<delete a whole buncha stuff>.................
Here's a quick how-to for newbie backups:
It's always better to do the following options:
% tar cvfC "/usr/local/backups/archive{`date +%D`}.tar" /home/bob
Not exactly a "newbie" but certainly without formal training. (learning on the fly) Don't know what the {date+%D} should represent, even after reviewing man date.
This states the following:
- create an archive (c) - be verbose about output (v) - specify the archive (f) - change the current working directory (C) - specifies the location and name of the archive as called by the "f" function ("/usr/local/backups/archive{`date +%D`}.tar") - specifies the directory to chdir into and call cwd (/home/bob) - specifies what files to "feed" into our archive (.) - all of them
This has the following advanteages:
You can specify the backup directory. You can implement the date structure into your backups - man date for available arguments. And you will not happen to write over any files accidentally because you have used relative paths in the creation of this archive.
BTW...you may notice that these the arguments and functions are in a particular order. This is by design.
i.e. the "f" function is the first one needing a argument...thus we place it's argument first. The "C" function is next...as is its argument...so on...and so forth.
All well and good and understood. Sooooo.... in my case, where I want to back up and protect my"home directories", and then choose what I want to keep, what would I do? Bob S.
The 03.05.13 at 02:04, Bob S. wrote:
All well and good and understood. Sooooo.... in my case, where I want to back up and protect my"home directories", and then choose what I want to keep, what would I do?
You might try mc (Midnight Comander). It is a console program similar to the old dos Norton Comander. One of the things it can do is create compressed tar archives (using tar, actually), and then look in to them and read arbitrary files, or copy to any destination. Not a GUI, but console, keyboard (even some mouse), and quite fast. Very nice for file browsing and copying. Another thing you can do is try "mkzftree". It creates a duplicate compressed tree ready to convert to an compressed iso image with "mkisofs -z ...", which you can pass to a CD for permanent backup. The kernel can read those CDs transparently, so you can use anything to copy/read/whatever files back. The only problem is when the image is larger than 700 Mb, there is no automatic split. -- Cheers, Carlos Robinson
On Tuesday 13 May 2003 01:04, Bob S. wrote:
On Sunday 11 May 2003 15:21, Thomas Jones wrote:
..................<delete a whole buncha stuff>.................
Here's a quick how-to for newbie backups:
It's always better to do the following options:
% tar cvfC "/usr/local/backups/archive{`date +%D`}.tar" /home/bob
Not exactly a "newbie" but certainly without formal training. (learning on the fly) Don't know what the {date+%D} should represent, even after reviewing man date.
you use the following: { and } specify that the contents need to be evaulated. Meaning it is a command, a variable, etc...... Obviously, this one is a command. if you issue this command at your shell, the you get: tjones@suse:~> date +%D 05/13/03 tjones@suse:~> date +%Y-%m-%d 2003-05-13 tjones@suse:~> etc.........this will just replace the command with the appropriate date and/or time group that you specify via the '+%whatever' switches.
<deleted>
All well and good and understood. Sooooo.... in my case, where I want to back up and protect my"home directories", and then choose what I want to keep, what would I do?
Bob S.
tjones@suse:~> tar tvf archive.tar ...will list verbosely all the files archived and: tjones@suse:~> tar xf archive.tar filename ....will extract that file. Be sure that specify any directories located within the archive file or it won't find it......ie....../dir1/subdir1/filename I suggest combining both commands and using grep to find the file by using this approach [this example was found in the UPT 2.0 book by o'reilly ----- ;) ]: tjones@suse:~> tar xf archive.tar `tar tf archive.tar | grep filename` HTH. -- Thomas Jones Linux-Howtos Administrator
participants (6)
-
Ben Rosenberg
-
Bob S.
-
Carlos E. R.
-
Franz Knuts
-
O'Smith
-
Thomas Jones