[Techtalk] ln and unmounted directories

Conor Daly conor.daly at oceanfree.net
Thu Jun 5 22:49:12 EST 2003


On Thu, Jun 05, 2003 at 01:47:51PM -0400 or so it is rumoured hereabouts, 
Emma Jane Hogbin thought:
> I have a backup directory that, for safe keeping, I don't mount unless I
> need something from it. It has a copy of my kernel, some kernel patches, 
> config files, etc. Instead of only copying files into that directory I'm
> thinking about creating a set of files with hard links. I'm not sure if
> this would work though.

This won't work.  You can only make hard links to files in the same
filesystem.  
 
> The files I'm thinking about are not in my home directory:
> XF86Config-4
> httpd.conf -- apache
> main.cf -- postfix

All of these are in /etc 
 
> Any ideas on how to keep a current copy of these files handy?

Consider CVS?  If you create a cvs repository on your safety partition,
cvs import /etc, then cvs co etc to make /etc a cvs monitored working
directory, you can sync your safety store by:

mount /safety/store
cvs commit
umount /safety/store

It has the added advantage that it keeps a history of your configs so when
you break your postfix main.cf you can get the previous one back.
 
The other possibility is rsync which will happily do the job for you:

mount /safety/store
rsync -ax /etc /safety/store/
umount /safety/store

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
 10:41pm  up 22 days,  1:10,  0 users,  load average: 0.00, 0.02, 0.00
Hobbiton.cod.ie
 10:40pm  up 22 days,  1:09,  1 user,  load average: 0.00, 0.03, 0.00


More information about the Techtalk mailing list