Koozali.org: home of the SME Server

Backup some users email and delete accounts

Offline cyberfido

  • *
  • 13
  • +0/-0
Backup some users email and delete accounts
« on: August 21, 2014, 05:42:41 PM »
Hi all,
I need to free space on my SME Server and to do this I would delete some old user accounts.
However I'd like to backup somewhere the configurations and emails of these accounts before deleting them.
How could I do this letting me in the future an easy restore of the information in case someone needs access to that account?

Thanks in advance

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Backup some users email and delete accounts
« Reply #1 on: August 21, 2014, 05:56:15 PM »
just use a mail client to pull out the emails

then empty all the emails and the users' home dir..

don't delete the accounts, lock them

my 2€c

Offline cyberfido

  • *
  • 13
  • +0/-0
Re: Backup some users email and delete accounts
« Reply #2 on: August 21, 2014, 06:05:41 PM »
just use a mail client to pull out the emails
So, you suggest me to pull emails with POP3 to free the email folders and then backup in some manner on local PC the emails downloaded?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Backup some users email and delete accounts
« Reply #3 on: August 21, 2014, 07:17:22 PM »
pop3 or imap, it doesn't matter.. imap could be re-imported easily

hint: use Thunderbird, forget anything made by M$

Offline cyberfido

  • *
  • 13
  • +0/-0
Re: Backup some users email and delete accounts
« Reply #4 on: August 21, 2014, 08:02:40 PM »
if I use IMAP to flush the folders how do I do?
Which folders in user folder Have I to delete? Maildir maybe and all its files and subdirectories?

P.S. I use Thunderbird since 2008. I think is much better than M$
P.P.S. It seems very strange for me to talk with an Italian in English :P

guest22

Re: Backup some users email and delete accounts
« Reply #5 on: August 21, 2014, 09:45:37 PM »
Create the account in Thunderbird, then go in off-line mode for all foders.

Ciao

guest

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup some users email and delete accounts
« Reply #6 on: August 22, 2014, 03:54:19 AM »
cyberfido

Quote
How could I do this letting me in the future an easy restore of the information in case someone needs access to that account?

Archive the user home folders with tar, save them to USB attached to the server.
Then delete all those messages & other data files in the users home folder, off the server using mc or command line
Remember that backup is your ONLY copy of those messages & if it fails in the future you will not be able to restore anything, so make a second copy on a seperate disk for redundancy purposes.

Then lock the user accounts.

You can easily restore those messages & files directly to the server (in the correct format for the sme server mail server etc) if needed in future.

Something like this should do

cd /home/e-smith/files/users
mount the USB drive
tar -czvf /media/USBmount/username1.tar.gz username1
tar -czvf /media/USBmount/username2.tar.gz username2
tar -czvf /media/USBmount/username3.tar.gz username3
and so on...

See here for concepts
http://wiki.contribs.org/Backup_server_config#Copying_data_to_the_restored_server
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cyberfido

  • *
  • 13
  • +0/-0
Re: Backup some users email and delete accounts
« Reply #7 on: August 28, 2014, 10:32:38 AM »
Thanks to all for the replies.
This forum is very precious.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Backup some users email and delete accounts
« Reply #8 on: August 28, 2014, 11:12:36 AM »
P.P.S. It seems very strange for me to talk with an Italian in English :P

then come to italian language forum too ;-)