[conspire] how do I move my .mozilla directory and all the mail contents to an external drive

David Fox dfox94085 at gmail.com
Fri Apr 18 18:41:14 PDT 2008


On Fri, Apr 18, 2008 at 6:11 PM,  <freepalestin at dslextreme.com> wrote:
> I use Seamonkey for my browser and email. I request no flaming.
>  I want to move the .mozilla directory to an external drive and have access

Darlene, I think you're on the right track, but let's make sure of a
couple of things first.

1) This external drive - are the permissions of the mounted directory
(i.e., /mnt/whereever) sufficient to let an ordinary user go inside
the directory and browse the files?

2) What about the ownership/permissions on the mounted drive? If you
just copy the files over, permissions should be maintained if you do
the copy command right.


>  How do I move my .mozilla directory and all the mail contents
>  to an external drive and still have access to all my email
>  accounts and the email in them?

A symbolic link (ln) should help, since that will have seamonkey (or
any program, realy, see that the .mozilla in /new/path should be used
(i.e., follow the links) to put your files on the new location.

One thing you can't do (and shouldn't be an issue, but I'll bring it
up) is that you can't hard link directories or files on one filesystem
to a file on another filesystem.

>
>  I tried
>  mv .mozilla /new/path

I'd first do a copy, rather than a move. That way, you can test the
new configuration, and if everything works, you can remove the files
in .mozilla (but be careful which directory you're in).

cd to your $HOME
(Many copies or moves fail because you're not quite at the right level
of the tree when you do the copy or move. I've run into that snag a
few times, and the result is fixable, but you have to do a lot of
moving things around to get the tree to look right.)

then do
$ cp -a .mozilla/* /new/path/

(Assuming .mozilla will simply be at the top of the filesystem in
/new/path, not in a subdirectory beneath some other directory.


>  ln -s /new/path/.mozilla ./

I'm thinking it's safer to be in $HOME/.mozilla when you do the link,
but that's not necessary. I did something similar to this when I
wanted to move the larger directories out of .googleearth (cache files
particularly when running Google Earth) to save space.

The link seems to be more difficult. I did some prelimnary tests,
setting up a . directory in /tmp (/tmp/.mozilla) and tried to link
this directory to /storage/.mozilla.

The operation *looks* like it succeeded, but I think I got bit by not
being able to link directories across file systems. See what happens

I create a directory, put something in there, and then:


dfox at m206-157:/tmp$ rm -rf .mozilla
dfox at m206-157:/tmp$ mkdir .mozilla
dfox at m206-157:/tmp$ cd .mozilla
dfox at m206-157:/tmp/.mozilla$ cat >test
foo
.
dfox at m206-157:/tmp/.mozilla$ ls -l
total 4
-rw-r--r-- 1 dfox dfox 6 2008-04-18 18:36 test
dfox at m206-157:/tmp/.mozilla$ ln -sf /tmp/.mozilla /storage
ln: `/storage/.mozilla': cannot overwrite directory
dfox at m206-157:/tmp/.mozilla$ ln -sf /tmp/.mozilla /storage/.mozilla
dfox at m206-157:/tmp/.mozilla$ ls -l /storage/.mozilla
total 0

So look there's no 'test' in storage/.mozilla!

But this works:
dfox at m206-157:/tmp/.mozilla$ cd ..
dfox at m206-157:/tmp$ rm -rf .mozilla
dfox at m206-157:/tmp$ rm -rf /storage/.mozilla
dfox at m206-157:/tmp$ mkdir /storage/.mozilla
dfox at m206-157:/tmp$ ln -sf /storage/.mozilla .mozilla
dfox at m206-157:/tmp$ cd .mozilla
dfox at m206-157:/tmp/.mozilla$ cat >test
foo
dfox at m206-157:/tmp/.mozilla$ cd /storage/.mozilla
dfox at m206-157:/storage/.mozilla$ ls -l
total 4
-rw-r--r-- 1 dfox dfox 4 2008-04-18 18:39 test


IOW, put the placeholder in $HOME, then do the link - a regular file
links to a directory somewhere else.




More information about the conspire mailing list