Win space on Debian server

Discussion in 'Linux Beginners' started by kameleon1er, Aug 1, 2021.

  1. kameleon1er

    kameleon1er Member

    Hi Guys,
    Newbie's on the run …
    I have a tiny VPS server with the excellent IspConfig 3 as Master. Debian Buster / Mem = 4 Go / Disk 40Go
    Just Wordpress in it (1 wordpress MU) working fine.
    But I'm now @ 80% occupation on HDD.
    du - command answer me :
    Code:
    root@srv:/var/www/clients# du -sB G /var/www/clients/client0/web2/
    6G    /var/www/clients/client0/web2/
    root@srv:/var/www/clients# du -sB G /var/www/clients/client0/web1/
    6G    /var/www/clients/client0/web1/
    root@srv:/var/www/clients# du -sB G /var/www/clients/client0/web3/
    3G    /var/www/clients/client0/web3/
    root@srv:/var/www/clients# du -sB G /var/www/clients/client0/web6/
    1G    /var/www/clients/client0/web6/
    ——————————————————————————————
    = 16 Go in /var/www
    So , What happened to the rest?

    I Think in my mailboxes (Postfix).
    Is it an effescient way to delete old mails with attachements, maybe, from one date to another ? I need space optimisation.

    Thanks for your lights :)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    First, check if the space is indeed used by emails with:

    du -h --max-depth= 1 /var/vmail/

    this should show you which email domain uses how much space. Then there is one thing in email space that emails are not always deleted by the email client, some email clients just mark emails as deleted and hide them instead of removing them from the hard disk. Check if your mail client has an option like compress folders or similar, run this function in your mail client to let it clean up files via imap.
     
  3. kameleon1er

    kameleon1er Member

    Hi @till , it's seems correct.

    it looks good

    But if I make backups in ispConfig, then I have no more space. Maybe I should exclude the mail folder, or add an extra volume to the VPS ;-)
    Code:
    543288    vmail/mailBox1.com
    1496    vmail/mailBox2.com
    21164    vmail/mailBox3.com
    2717132    vmail/mailBox4.com
    196    vmail/mailBox5
    ------------------------------------------------
    3.2G    vmail/
    Code:
    System load:    8.53       
    Memory usage:    0.0%       
    Usage on /:    75%       
    Local Users:    1       
    Image build:    2020-01-15   
    Disk :    l_ssd 40G
    Is it planned in a future version to be able to backup to an external server for example; ftp, scp, GoogleDrive...?

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This is available for many years now, you can use any mountable drive for backups. You should find various posts in the forum about this topic. You have to create a mount script and then activate the feature under System > server config
     
    ahrasis likes this.
  5. kameleon1er

    kameleon1er Member

    Ok, I will see. Thanks for your help.
     
  6. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    3.2G in vmail seems excessive. Unless its holding many thousands of emails or some very large attachments. I see its two of the mail domains contributing the bulk of it. drop the max depth flag and you can see exactly which mail boxes it is.

    This is mine, but I don't send or receive much mail and I also have thunderbird clean up junk and deleted mail on close.
    Code:
    43M   /var/vmail/domain1.com
    7.1M   /var/vmail/domain2.com
    4.0K   /var/vmail/mailfilters
    51M   /var/vmail/
    
    A thought just occured to me, are you using pop or imap? pop does as Till described, hides the mail in the client but doesnt delete it at the server, I think maybe its a read only protocol.
     

Share This Page