Urgent: Deleted Maildir (How to Restore?)


#1

I accidentally removed the Maildir folder from my root account. As a result, I can no longer check my main email account.

Is there a way I can restore / recreate this folder?

Jonah Bishop
Visit Born Geek


#2

In shell, type:

cp ~/.snapshot/nightly.1/Maildir ~/Maildir chmod 0700 ~/Maildir
Those two commands restore the directory from a backup from last night and set appropiate permissions.

You can probably do the same in FTP, but you’d have to do a manual command (eg “QUOTE CWD /.snapshot/nightly.1” IIRC)

:cool: Perl / MySQL / HTML+CSS


#3

I apparently do not have a .snapshot folder (I don’t see it with ls -a). When I run the ‘cp’ command you gave me, I get the following error:

cp: omitting directory `/home/jgbishop/.snapshot/nightly.1/Maildir’

Any other ideas?

Jonah Bishop
Visit Born Geek


#4

I apparently do not have a .snapshot folder (I don’t see it with ls -a).

It’s hidden. Really hidden – you won’t see it with -a but you can cd into it. Try it.

When I run the ‘cp’ command you gave me, I get the following error:

The -R flag was forgotten. You’ll need this to copy directory trees. You can also omit the second command above by adding -p, which will preserve the original permissions. Try it again:

cp [b]-Rp[/b] ~/.snapshot/nightly.1/Maildir ~/Maildir

If you want useful replies, ask smart questions.


#5

That did it! Thanks so much.

Jonah Bishop
Visit Born Geek