[PLUG] Backup mistake

Richard Steffens rsteff at attbi.com
Sat Nov 16 01:42:40 UTC 2002


I started a backup of my /var/www/html by copying it to another drive.
Unfortunately, I failed to account for a link that points back to the
root of the destination drive, so I've filled up a 40Gb drive with what
should have been less than a gig! Now, I'm looking for what to do to
undo this mistake. 

How I got where I am:

I have the 40 Gb drive mounted at /home/mp3. I've created a directory in
there called NECbackup, and I created a directory in there called
021115-var-www-html-backup. While at /home/mp3/NECbackup, I started the
copy by running:

# cp -R /var/www/html 021115-var-www-html-backup/

Inside one of the directories under /var/www/html is a directory,
MusicDB, with a link to /home/mp3. So, I've recursively created a large
number of copies that I shouldn't have. I suspect that there's an option
to ignore links, but I didn't read up enough to understand that before I
began.

So, now that I have all this, should I go to the first place down the
tree that the recursive copies begin and delete that by running:

cd /home/mp3/NECbackup/021115-var-www-html-backup/MusicDB
rm -R mp3

I note that ls -l shows mp3 in
/home/mp3/NECbackup/021115-var-www-html-backup/MusicDB as a directory,
whereas it shows mp3 as a link in /var/www/html/MusicDB.

For future reference, what should I have done? I just looked at the man
page for cp and didn't see a way to ignore links.

-- 
Regards,

Dick Steffens
http://rsteff.home.attbi.com/




More information about the PLUG mailing list