Team Calendar cloud migration
Asked by Jonathan Vaughan:

When migrating from confluence server to cloud, what's the best way to deal with existing calendars?


Answers:
author: Philip Colmer
body: It is on the [Cloud Roadmap \| Atlassian](https://www.atlassian.com/roadmap/cloud) to be supported by Q2 2021.

comments: author: Robert Horan
body: Any news?


author: Joe Doherty
body: [@Robert Horan](/t5/user/viewprofilepage/user-id/2922891) - as of today the roadmap says Q2-Q3 2022 ?

[https://www.atlassian.com/roadmap/cloud?selectedProduct=\&search=calendar](https://www.atlassian.com/roadmap/cloud?selectedProduct=&search=calendar)


author: Thomas Jones
body: This is very painful that Atlassian is forcing us to migrate now while their tools to enable that migration have slipped past the deadline.


author: Joe Doherty
body: [Cloud Roadmap](https://www.atlassian.com/roadmap/cloud??selectedProduct=&search=calendar&p=056799d9-41) latest update says "coming soon" - Q1-Q3 of 2023.

We are quickly approaching 3 years since [MIG-124](https://jira.atlassian.com/browse/MIG-124) was first suggested. When we try to get support for the suggested workaround, the migration support team has the nerve to say "well this isn't a supported tool."

Incredibly disappointing experience for Atlassian customers.


author: Shannon S
body: Hello Jonathan,

Thank you for contacting us about this.

The best way to migrate your calendars is to recreate them in Confluence Cloud using the .ics URL.

* Step 1: [Export Team Calendars Content to Other Calendars](https://confluence.atlassian.com/teamcal/export-team-calendars-content-to-other-calendars-240913738.html)
* Step 2: [Create, Add, and Edit Calendars \> Add Other Calendars](https://confluence.atlassian.com/teamcal/create-add-and-edit-calendars-654213559.html#Create,Add,andEditCalendars-Addothercalendars)

Essentially, you'll export your calendars to .ics format, and then import them again. However, I do want you to be aware of a current bug that I ran into myself when doing this for my own instance:

* [CONFCLOUD-49097](https://jira.atlassian.com/browse/CONFCLOUD-49097) *Custom event types after import becomes default events*

If your calendar contains any custom event types, which it likely does, then these will be converted to **default** events. You will need to manually recreate your custom event types and then apply these once again to your events. If you have recurring events then please make sure to modify all events and not just the single event, and it should apply the change to each recurring day.

Do let me know if you have any questions about this.

Regards,

Shannon

comments: author: Jason Wong
body: Note that [CONFCLOUD-49097 custom event types](https://jira.atlassian.com/browse/CONFCLOUD-49097) has now been fixed!

The work was logged here [CONFCLOUD-68823 - ICS Import of a Team Calendar with multiple event types results in a calendar with just one event type](https://jira.atlassian.com/browse/CONFCLOUD-68823)
> This issue is now fixed. When importing a calendar with custom event types, the event types are now retained after import.


author: Darren Newberry
body: Has anyone that has used the export/import method noticed that it does not carry over the person field for who the event is assigned to? wondering if its a known issue or just something we are facing.


author: Robert Horan
body: [@Darren Newberry](/t5/user/viewprofilepage/user-id/4450719) - this is a known issue. I was trying to find a ticket but can't. There's no way I know of currently to export this information.


author: Eddy KENTSA
body: Hi [@Shannon S](/t5/user/viewprofilepage/user-id/510046) ,

My company is migrating all our Team Calendars data from Confluence Server to Cloud.

Could you tell if the workaround you are providing keeps the person field data safe ? Moreover is there any workaround to migrate seamlessly all our calendars to the Cloud ?

Thanks in advance.


author: Thomas Jones
body: We found Atlassian's calendar migration tools riddled with errors and design flaws: while Atlassian has no hesitation shoving customers to the Cloud, they don't provide the tools they promised to support that migration.

We exported our Confluence Server calendars to .ics and loaded them in Google Calendar. We lost some fields in the migration --- but bizarrely retained a lot more data than when we tried migrating from Confluence Server to Confluence Cloud.

We ditched Confluence Calendars, switched to Google Calendars, and never looked back. You may find similar "success" with Outlook or another calendar system that can import .ics.

Good luck --- you're going to need it.


author: Darren Newberry
body: We are Just a week into post migration and am starting to find more and more issues. :-(


author: Darren Newberry
body: Here is the solution that Atlassian offered.

The good news is that we have a team-calendars migration script. Full details are in the README of the script posted here:

<https://bitbucket.org/atlassianlabs/team-calendars/src/master/>

warning: Please note that this is not an officially supported tool/script, so this is intended to be used as-is with thorough testing until an official migration method is released.

That way we expect to see better results and all the team Calendars migrated successfully to your cloud site!


author: Eddy KENTSA
body: Hi [@Darren Newberry](/t5/user/viewprofilepage/user-id/4450719) , please could you tell me what errors you have found while using the Atlassian solution with team-calendars migration script ? I am about to try it but some people complain on the efficiency of that script. Thanks in advance.


author: Darren Newberry
body: Been reading over the documentation and even for me as a seasoned IT veteran it is a bit complex. And my environment does not lend it self to having the ability to install python to run the script so I am still trying to figure out how to execute it. I will report back when I was able to run it. Please do the same.


author: Robert Horan
body: Agreed with [@Darren Newberry](/t5/user/viewprofilepage/user-id/4450719) - not everyone has the ability to work with scripts. However, the share and the effort that went into this solution are very much appreciated!

This is one of those times that remind me that I need to learn Python, and maybe pick up some other scripting experience.

(free time always being the limiting factor)


author: Justin Brydges
body: Here is what I had to do for a Windows Server in order to utilize the Bitbucket repo for Confluence Calendars. There was a lot of troubleshooting involve and potentially may not utilize anyway because we noticed we were losing data. I found that the iCal to import option as more reliable solution. We don't have a large environment but enough for it to be a pain.

All of the information provided below is a working example of Bitbucket repo provided by Atlassian.

++Information was provided here++ <https://bitbucket.org/atlassianlabs/team-calendars/src/master/>

1. Install WSL 2 for Windows (Windows Subsystem for Linux) - must be on Windows 10 version 2004 or later (or Windows Server 2022)
   1. Open PowerShell as Administrator

|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 | # Enable the Windows Subsystem for Linux dism.exe /online /enable**-feature** /featurename:Microsoft**-Windows-Subsystem-Linux** /all /norestart #Enable Virtual Machine feature dism.exe /online /enable**-feature** /featurename:VirtualMachinePlatform /all /norestart |

1.
   1. Restart Computer
   2. Install ++WSL2 Linux kernel update package for x64 machines - <https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi>++
   3. Set WSL2 as Default and install Ubuntu Subsystem

|-----------|------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 | # Set WSL2 as default wsl -**-set-default-version** 2 # Install Ubuntu Subsystem wsl -**-install** **-d** ubuntu |

1.
   1. ++Create a user account and password for your new Linux distribution++ <https://docs.microsoft.com/en-us/windows/wsl/setup/environment#set-up-your-linux-username-and-password>  

2. ++Clone teams-calendar for Confluence from Bitbucket++ and store it in C:\\Temp\\team-calendar
   1. Go to Confluence Cloud Administration --\> User Management page
   2. Click *Export users*
   3. Choose 'All users on the site', 'Only active users', 'Product access', and click *Download file* and save to C:\\Temp\\teams-calendar  
      Generate the email addresses \<--\> Atlassian Account IDs mapping file as follows
   4. Open Windows PowerShell and run the following command:

|-------|-----------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 | **cd** C:\\temp\\team**-calendars** bash awk **-F** "," '{ printf("%s,%s\\n", $3, $1) }' export**-users**.csv \> aaid_mapping.csv |

1. Get Confluence Calendars from SQL Database
   1. Open SQL Management Studio and run the following query against the Confluence Database

|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 | **SELECT** "SPACE_KEY", "ID", "NAME" **FROM** dbo."AO_950DC3_TC_SUBCALS" **WHERE** "SPACE_KEY" **IS** NOT Null and "SPACE_KEY" not like '\~%' AND "STORE_KEY" NOT LIKE '%Subscrip%' AND "PARENT_ID" **IS** NULL **ORDER** **BY** 1,2; |

1.
   1. Copy all items returns and paste into a blank Excel file and save it as CSV. Recommended name of csv is space_calendars.csv. Save file to C:\\Temp\\team-calendars
2. Install Python Requirements for Confluence Calendar migration
   1. Open PowerShell as Administrator and run the following commands

|-----|-------------------------------------------------------------------------|
| 1 2 | **cd** c:\\temp\\team**-calendars** pip install **-r** requirements.txt |

1.
   1.
      1. If you experience an error installing the requirements on the following, please follow next steps
         1. Uninstall Python and install an earlier version - recommended 3.10.6
         2. Error for demjson 2to3
            1. Solution: Downgrade pip: pip install --upgrade setuptools==57.5.0
         3. error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": ++<https://visualstudio.microsoft.com/visual-cpp-build-tools/>++
            1. Solution is to download the Visual Studio Build Tools here: ++<https://aka.ms/vs/17/release/vs_BuildTools.exe>++ and install the **Desktop Development with C++ workload**
2. Run Confluence Calendar Migration
   1. In PowerShell run the script:
      1. EXAMPLE:

|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 | **cd** C:\\Temp\\team**-calendars** python migrateTeamCal.py **-s** http://\<Confluence Server\> -**t** https://\<site\>.atlassian.net/wiki **-su** \<source admin user\> **-sp** \<source admin password\> **-tu** \<cloud site admin email\> **-tp** \<cloud site admin API key\> -**-input-file** space_calendars.csv -**-aaid** aaid_mapping.csv -**-Space** \<Space Name for test\> |

To Migration all spaces, Remove *--Space \<Space Name\>.*I left that there for testing, so you do not migrate all spaces. The script is expected to take some time as it must recreate all event on each calendar


Tags: cloud

confluence-server

server

team-calendars-for-confluence