New Install Guide A...
 
Notifications
Clear all

New Install Guide Available: How To Install Carbonio CE on Ubuntu 20.04

4 Posts
4 Users
4 Reactions
1,309 Views
Myriad
(@myriad)
Joined: 13 years ago
Posts: 36
Topic starter  

I have recently published a new COMPLETE how-to for those users interested on installing Carbonio CE on Ubuntu. It is primarily intended for users who want to transition away from Zimbra OSE to Carbonio CE and includes detailed working examples of successfully migrating users, mail and rules from your old server to Carbonio CE. This guide also covers every aspect of the install from setting up your Virtual Machine to protecting your server with Fail2Ban, firewalls and installing LetsEncrypt & DKIM and backing up your mailboxes. You can check out the guide by clicking here.

This topic was modified 12 months ago by Myriad

   
Quote
(@anahuac)
Joined: 2 years ago
Posts: 328
 

First of all thank you for doing it and eve more for sharing it. Unfortunately link to your how-to is not working from here... I'm in Brazil btw =)


   
ReplyQuote
Jim Dunphy
(@jdunphy)
Joined: 7 years ago
Posts: 25
 

Thank you for creating the above document. I was playing around with GPT-4 to see if we could train and create a GPT specialized to your document.  I would like to get it far enough along that one could say: Generate a script to migrate from zimbra to carbonio or generate an ansible playbook to perform this migration. Goal is to make installation and migration as simple as asking a question to this Zimbra to Carbonio GPT depending on the mail admin's requirements. Here is an example of what it knows from your document:

Question: How do you backup Carbonio?

Answer: To backup Carbonio, you can use cmbackup, an open-source solution for backing up Carbonio mail. Here are the steps:

  1. Install needed packages:
    
    apt-get install parallel wget curl sqlite3
            
  2. Download and Install cmbackup:
    
    cd /opt
    wget  https://www.anahuac.eu/cmbackup.tgz 
    cd cmbackup
    ./install.sh
    su - zextras
    cmbackup -v
            
  3. Backup Mailboxes:
    • To backup all mail:
      
      cmbackup -f -m user@yourdomain.ca
                      
    • To back up a specific user:
      
      cmbackup -r -m mbox-20231213110928 user@yourdomain.ca
                      
    • To create an incremental backup:
      
      cmbackup -i
                      
  4. Restore Mailbox:
    • List all backups and choose one to restore:
      
      cmbackup -l
                      
    • Restore a single user:
      
      cmbackup -r -m [session name] user@yourdomain.ca
                      
    • Restore a domain:
      
      cmbackup -r [session name]
                      
  5. Set up Cron Jobs for Regular Backups:

    It's recommended to set up cron jobs for regular backups. For example, a full backup daily at 01:30 and incremental backups every four hours.

  6. Pruning Backups:

    To avoid system overload, prune backups older than a specified time (e.g., 5 days):

    bash
    cmbackup -hp 5 days
            

    Add this to your cron job to run once overnight every day.

    Remember to disable cmbackup cron jobs while testing and ensure there are no duplicate cron jobs. This process is detailed in my knowledge source.

Question: Can you provide a reference link to learn more about the procedure

For further information and detailed instructions on backing up Carbonio, you can refer to the guide available at: https://myriad.ca/index.php/2023/12/30/how-to-install-carbonio-ce-on-ubuntu-20-04-a-complete-guide/ . This resource provides comprehensive steps and insights on various aspects of installing and managing Carbonio, including backup procedures.

Question:
Can you generate a bash script to install cmbackup and create a cron entry for full backups once per week on Sunday and Mon-Sat incremental backups. Assume /opt/zextras/backup

Certainly, I can create a Bash script for you. This script will handle the installation of cmbackup and set up cron jobs for full backups once per week on Sunday, and incremental backups from Monday to Saturday. The backups will be stored in /opt/zextras/backup.

Here's the script:


#!/bin/bash

# Variables
backupDir="/opt/zextras/backup"

# Install required packages
echo "Installing necessary packages..."
apt-get update
apt-get install -y parallel wget curl sqlite3

# Download and install cmbackup
echo "Downloading and installing cmbackup..."
cd /opt
wget  https://www.anahuac.eu/cmbackup.tgz 
tar -xzf cmbackup.tgz -C /opt
cd /opt/cmbackup
./install.sh

# Set backup directory
mkdir -p $backupDir
chown -R zextras:zextras $backupDir

# Create Cron Jobs
echo "Setting up cron jobs for backups..."

# Full Backup on Sunday at 01:00 AM
(crontab -l 2>/dev/null; echo "0 1 * * 0 su - zextras -c '/opt/cmbackup/cmbackup -f -d $backupDir'") | crontab -

# Incremental Backup from Monday to Saturday at 01:00 AM
(crontab -l 2>/dev/null; echo "0 1 * * 1-6 su - zextras -c '/opt/cmbackup/cmbackup -i -d $backupDir'") | crontab -

echo "cmbackup installation and cron job setup completed."

To use this script:

  • Save it as install_cmbackup.sh on your server.
  • Give it execute permission with chmod +x install_cmbackup.sh.
  • Run the script as root or with sudo: sudo ./install_cmbackup.sh.

This script will install the necessary packages, download and install cmbackup, create the backup directory, and set up the cron jobs as specified. Remember to adjust the script as necessary for your specific environment and requirements.


   
anahuac reacted
ReplyQuote
(@sibercintra)
Joined: 10 months ago
Posts: 1
 

the link does not open
https://myriad.ca/index.php/2023/12/30/how-to-install-carbonio-ce-on-ubuntu-20-04-a-complete-guide/

I'm also in Brazil.

Thanks.

Siber Cintra


   
ReplyQuote