{"id":1830,"date":"2017-07-25T21:27:52","date_gmt":"2017-07-25T15:57:52","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=1830"},"modified":"2026-09-12T13:44:53","modified_gmt":"2026-09-12T08:14:53","slug":"migrating-email-accounts-ajenti-vestacp","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/migrating-email-accounts-ajenti-vestacp\/","title":{"rendered":"Migrating email accounts from Ajenti to VestaCP"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p class=\"isSelectedEnd\">Migrating email accounts from one control panel to another can be a tedious task due to differences in mail directory structures, file permissions, ownership, and mailbox formats.<\/p>\n<p>In this guide, we will explain how to migrate existing email accounts from an <strong>Ajenti control panel server<\/strong> to a <strong>VestaCP server<\/strong> while preserving the existing mailbox data. The migration uses <code dir=\"ltr\">rsync<\/code> to securely transfer the email data between the source and destination servers.<\/p>\n<h2>Prerequisites<\/h2>\n<p class=\"isSelectedEnd\">Before starting the migration, make sure you have the following:<\/p>\n<ul data-spread=\"false\">\n<li>Root or administrative SSH access to both the Ajenti and VestaCP servers.<\/li>\n<li>SSH connectivity between the source and destination servers.<\/li>\n<li><code dir=\"ltr\">rsync<\/code> Installed on both servers.<\/li>\n<li>Sufficient disk space on the VestaCP server for the migrated mailboxes.<\/li>\n<li>The required domains and email accounts already created in VestaCP.<\/li>\n<li>A backup of the email data before starting the migration.<\/li>\n<li>The source and destination mail directory paths should be confirmed.<\/li>\n<\/ul>\n<h2>Implementation<\/h2>\n<h3>Assumption:<\/h3>\n<ol>\n<li>Source server (Ajenti Control Panel) &#8211; Exim mail directory=&gt; \/var\/vmail<\/li>\n<li>Destination Server(VestaCp Control Panel) &#8211; Exim Mail direcory =&gt;\u00a0\/home\/admin\/mail\/<\/li>\n<\/ol>\n<p>First, create all the email accounts on the destination VestaCP control panel<\/p>\n<p><strong>Vestacp &gt; Mai l &gt; Select &lt;Domain&gt; \u00a0&gt; Click on +<\/strong><\/p>\n<p>Add all the source email addresses on the destination server.<\/p>\n<p>Now, it&#8217;s time to migrate the email account from the backend.<\/p>\n<p>Execute the command below on the source Ajenti server.<\/p>\n<p><code>rsync -avz --exclude \"courier*\" -e ssh \/var\/vmail\/domain.tld\/ root@xx.xx.xx.xx.xx:\/home\/admin\/mail\/domain.tld\/<\/code><\/p>\n<p>Execute the command below on the destination VestaCP control panel server.<\/p>\n<p><code>chmod 770 \/home\/admin\/mail\/domain.tld<\/code><\/p>\n<p>Change the ownership of the directory.<\/p>\n<p><code>chown -R admin.mail \/home\/admin\/mail\/domain.tld<\/code><\/p>\n<p>Repeat the same process for other domains if we have multiple domains.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Data, permissions, and ownership. By creating the email accounts first and then transferring the mailbox data using rsync, you can migrate existing emails with minimal manual work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the migration, always verify mailbox folders, permissions, ownership, and email sending and receiving to ensure that the migration was completed successfully<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Can I migrate email accounts from Ajenti to VestaCP without losing existing emails?<\/strong><br>Yes. If the mailbox data is copied correctly and the required email accounts are created on the destination server before migration, existing emails can be preserved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Why should I create the email accounts in VestaCP before copying the mail data?<\/strong><br>Creating the accounts first ensures that the required domain and mailbox directory structure is available on the destination server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. What is <code>rsync<\/code> used for during the migration?<\/strong><br><code>rsync<\/code> Securely transfers mailbox files from the Ajenti server to the VestaCP server while preserving the directory structure and file attributes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/migrate-gsuite-mail-accounts-to-cpanel\/\">Migrate Gsuite mail accounts to cPanel<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to our experts<strong>:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business?. Our experts can help with\u00a0web hosting, domain registration, DevOps and cloud, software development, web applications, mobile applications, and enterprise solutions. Get in touch with our team <a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Migrating email accounts from one control panel to another can be a tedious task due to differences in mail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[299,360,344],"class_list":["post-1830","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-ajenti","tag-migration","tag-vestacp","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-tw","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1830"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":11717,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1830\/revisions\/11717"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}