Restore a deleted mailbox from backup

what’s the ownership of all the folders?
you might need to:
chown -R mail:mail /home/user-data/mail/mailboxes/

Ok, i forgot that, no errors now but all folders are empty except inbox.

Did you set the --time flag? If so, are you sure that this many days ago there was stuff in those folders? Seems like you’re almost there, just something else minor.

Ok, i will try now, for some reason it’s not picking all.

I would be tempted to leave off the --time and --file-to-restore flags … get the entire backup on your /tmp, and then copy over just the user folder you need.

Error without flags: Command line error: Expected 2 args, got 3

Can you give me the full command?

Try these to commands (ignore the first if you’ve already set the PASSPHRASE):

export PASSPHRASE=$(cat your_backup_secret_key_file.txt)
sudo -E duplicity restore file:///path/to/copied/files /home/user-data/

Like this?

sudo -E duplicity restore file:///home/user-data/backup/encrypted/ /home/user-data/

No, the file:/// would be the path to where you’ve got the encrypted stuff copied to to restore it from

sorry I copied that from the maintenance guide, I should have said like:
sudo -E duplicity restore file:///path/to/your/restore-from-files/ /tmp/restored-files

and then copy the folder you need from /tmp/restored-files

If isn’t this one /home/user-data/backup/encrypted/ i don’t know what path are you talking :confused:

Do you mean the user directory?

Sorry! Yes, if you are restoring from the local backups then this is correct. I was thinking you had backups stored like in S3 or on another server and were copying them over.

Still not getting the other folders emails. Could be a subdirectory permissions problem?

Can you see the messages when you look directly in the filesystem of the user directory?

On the cur/ directory? I can see messages on this directory but i can’t differentiate the mail folders of each one.

Yes, inside each of the subfolders, which start with “.” So like .Personal
Change directory into .Personal and see if the messages are in .Personal/cur

I just have /domain/user/cur/ not more directories inside, and i have all mails inside cur/

Also have new/ and tmp/ both are empty.

Try commands:

cd /domain/user/
ls -al

And see if you see all the folder names starting with a full-stop character

Ok, i forgot the hidden directories, my bad.

In fact are empty because the copy didn’t copied the hidden files, i used scp i will use now rsync.

You’re going to solve it soon!

Ok, it’s working now, i want to say thank you for your precious help and time. I love this product :slight_smile:

1 Like