stupid newbie question about mount

stupid newbie question about mount

Post by Josh Joyc » Wed, 07 Apr 1999 04:00:00




> Stupid question about mount, not stupid newbie (although sometimes....)

> I have a directory in /mnt set aside for hdc1 (/mnt/backup),a second
> harddrive. When running cron to perform a backup, should I mount the
> harddrive, copy my folders, etc, then umount? When I mount and unmount, does
> the directory look the same?  I guess what I'm really asking is: Why I can
> copy files to the specific directory even tho' /dev/hdc1 isn't mounted?  When
> I do and ls -al on the /mnt/backup (hdc1) I can see things in there that
> aren't there when I mount it. (and vice-versa).

> Is anyone actually following this?

From what I can tell, /mnt/backup is simply a directory. When /dev/hdc1
is not mounted, you are just copying files from wherever they are into
/mnt/backup, not across partitions as you had planned. Be sure to mount
/dev/hdc1 before backing up. It isn't really a must that you umount
/dev/hdc1 after each backup; if you have your backup running as a cron
job frequently you might as well leave the partition mounted. You could
always grep /etc/mtab to check if it's mounted before the backup, etc.

I hope this helps. :)

Josh

 
 
 

stupid newbie question about mount

Post by jxfau.. » Thu, 08 Apr 1999 04:00:00



> You could
> always grep /etc/mtab to check if it's mounted before the backup, etc.

This is good advice, or else all the backed up data will intrude on the
disk space of the root filesystem.