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