<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Backupscript in Teamwork &amp; BIMcloud</title>
    <link>https://community.graphisoft.com/t5/Teamwork-BIMcloud/Backupscript/m-p/255623#M6581</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi there,&lt;BR /&gt;This is maybe a little bit of topic, but also not. So I'll give it a try. &lt;BR /&gt;&lt;BR /&gt;First question:&lt;BR /&gt;When running the "TeamworkServerBackupTool" from terminal, it outputs how successful the backup went.&lt;BR /&gt;I was wondering, how can I add this in a shell script (bash) so it sends me a mail with this info after every run? I know the syntax for sending the mail, but how do I redirect the standard output so it will be included in the e-mail?&lt;BR /&gt;&lt;BR /&gt;Also, in the provided example in the Backup user guide from Graphisoft, there is a shell script for backup. But I would like to add to this script so that it sends me an e-mail telling me if the ServerDaemon and the ManagerDaemon has successfully started again. How do I add this to the mail? Any pointer on how to achieve this? &lt;BR /&gt;&lt;BR /&gt;This is my current script so far. I'm doing a backup of the whole manager and server and using the "TeamworkServerBackupTool". Let's just say that we what both backups. &lt;BR /&gt;&lt;BR /&gt;____________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;# Adjust path for the below components. Projects, Libraries and Manager Data folders can be in special locations!&lt;BR /&gt;ManagerDir="/Applications/GRAPHISOFT/BIMcloud/Manager-2018-10-11-3"&lt;BR /&gt;ManagerDataDir="/Applications/GRAPHISOFT/BIMcloud/Manager-2018-10-11-3/Data"&lt;BR /&gt;ServerDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3"&lt;BR /&gt;ProjectDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/Projects"&lt;BR /&gt;LibraryDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/Attachments"&lt;BR /&gt;localBkUp="/Volumes/Test/BACKUPTEST"&lt;BR /&gt;ManagerDaemon="/Library/LaunchDaemons/com.graphisoft.PortalServerService-v22.0(Manager-2018-10-11-3).plist"&lt;BR /&gt;ServerDaemon="/Library/LaunchDaemons/com.graphisoft.TeamworkApplicationServerMonitor-v22.0(Server-2018-10-11-3).plist"&lt;BR /&gt;&lt;BR /&gt;# Editing the script below this line is not necessary!&lt;BR /&gt;&lt;BR /&gt;# Checking if BIMcloud Basic or the backup folder does not exist&lt;BR /&gt;if [[ ! -d ${ManagerDir} ]] || [[ ! -d ${ServerDir} ]] ; then&lt;BR /&gt;echo "BIMcloud Basic does not exist"&lt;BR /&gt;exit 1&lt;BR /&gt;elif [[ ! -dw ${localBkUp} ]] ; then&lt;BR /&gt;echo "${localBkUp} folder does not exist or the folder is not writable"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Cleaning the backup folder&lt;BR /&gt;rm -rf "${localBkUp}/Manager"&lt;BR /&gt;rm -rf "${localBkUp}/Server"&lt;BR /&gt;rm -rf "${localBkUp}/Single-Restore"&lt;BR /&gt;&lt;BR /&gt;# Creating folders for the Backup&lt;BR /&gt;mkdir -pv "${localBkUp}/Manager"&lt;BR /&gt;mkdir -pv "${localBkUp}/Server"&lt;BR /&gt;mkdir -pv "${localBkUp}/Single-Restore"&lt;BR /&gt;&lt;BR /&gt;# Checking if the subfolders cannot be created&lt;BR /&gt;if [[ ! -dw "${localBkUp}/Manager" ]] || [[ ! -dw "${localBkUp}/Server" ]] ; then&lt;BR /&gt;echo "The subfolders in ${localBkUp} cannot be created or the folders are not writable"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Stopping Server and Manager&lt;BR /&gt;launchctl unload "${ServerDaemon}"&lt;BR /&gt;launchctl unload "${ManagerDaemon}"&lt;BR /&gt;&lt;BR /&gt;# Copying the Manager's data&lt;BR /&gt;cp -R "${ManagerDir}/Config" "${localBkUp}/Manager"&lt;BR /&gt;cp -R "${ManagerDataDir}" "${localBkUp}/Manager"&lt;BR /&gt;&lt;BR /&gt;# Restarting Manager service while copying files for Server so it has time to start properly&lt;BR /&gt;launchctl load "${ManagerDaemon}"&lt;BR /&gt;&lt;BR /&gt;# Copying the Server's data&lt;BR /&gt;cp -R "${LibraryDir}" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Config" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Mailboxes" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ProjectDir}" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Sessions" "${localBkUp}/Server"&lt;BR /&gt;&lt;BR /&gt;# Start the BackupTool and create project resotre files. Will create BIMProject and BIMLibrary files&lt;BR /&gt;/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/TeamworkServerBackupTool /Volumes/Test/BACKUPTEST/Single-Restore&lt;BR /&gt;&lt;BR /&gt;# Restarting Server service&lt;BR /&gt;launchctl load "${ServerDaemon}"&lt;BR /&gt;&lt;BR /&gt;echo "Backup complete" | mail -s "Backupstatus" &lt;A href="mailto: mail@mail.com" target="_blank"&gt;mail@mail.com&lt;/A&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 27 Feb 2024 11:07:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-27T11:07:52Z</dc:date>
    <item>
      <title>Backupscript</title>
      <link>https://community.graphisoft.com/t5/Teamwork-BIMcloud/Backupscript/m-p/255623#M6581</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi there,&lt;BR /&gt;This is maybe a little bit of topic, but also not. So I'll give it a try. &lt;BR /&gt;&lt;BR /&gt;First question:&lt;BR /&gt;When running the "TeamworkServerBackupTool" from terminal, it outputs how successful the backup went.&lt;BR /&gt;I was wondering, how can I add this in a shell script (bash) so it sends me a mail with this info after every run? I know the syntax for sending the mail, but how do I redirect the standard output so it will be included in the e-mail?&lt;BR /&gt;&lt;BR /&gt;Also, in the provided example in the Backup user guide from Graphisoft, there is a shell script for backup. But I would like to add to this script so that it sends me an e-mail telling me if the ServerDaemon and the ManagerDaemon has successfully started again. How do I add this to the mail? Any pointer on how to achieve this? &lt;BR /&gt;&lt;BR /&gt;This is my current script so far. I'm doing a backup of the whole manager and server and using the "TeamworkServerBackupTool". Let's just say that we what both backups. &lt;BR /&gt;&lt;BR /&gt;____________________________________________________________________&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;# Adjust path for the below components. Projects, Libraries and Manager Data folders can be in special locations!&lt;BR /&gt;ManagerDir="/Applications/GRAPHISOFT/BIMcloud/Manager-2018-10-11-3"&lt;BR /&gt;ManagerDataDir="/Applications/GRAPHISOFT/BIMcloud/Manager-2018-10-11-3/Data"&lt;BR /&gt;ServerDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3"&lt;BR /&gt;ProjectDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/Projects"&lt;BR /&gt;LibraryDir="/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/Attachments"&lt;BR /&gt;localBkUp="/Volumes/Test/BACKUPTEST"&lt;BR /&gt;ManagerDaemon="/Library/LaunchDaemons/com.graphisoft.PortalServerService-v22.0(Manager-2018-10-11-3).plist"&lt;BR /&gt;ServerDaemon="/Library/LaunchDaemons/com.graphisoft.TeamworkApplicationServerMonitor-v22.0(Server-2018-10-11-3).plist"&lt;BR /&gt;&lt;BR /&gt;# Editing the script below this line is not necessary!&lt;BR /&gt;&lt;BR /&gt;# Checking if BIMcloud Basic or the backup folder does not exist&lt;BR /&gt;if [[ ! -d ${ManagerDir} ]] || [[ ! -d ${ServerDir} ]] ; then&lt;BR /&gt;echo "BIMcloud Basic does not exist"&lt;BR /&gt;exit 1&lt;BR /&gt;elif [[ ! -dw ${localBkUp} ]] ; then&lt;BR /&gt;echo "${localBkUp} folder does not exist or the folder is not writable"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Cleaning the backup folder&lt;BR /&gt;rm -rf "${localBkUp}/Manager"&lt;BR /&gt;rm -rf "${localBkUp}/Server"&lt;BR /&gt;rm -rf "${localBkUp}/Single-Restore"&lt;BR /&gt;&lt;BR /&gt;# Creating folders for the Backup&lt;BR /&gt;mkdir -pv "${localBkUp}/Manager"&lt;BR /&gt;mkdir -pv "${localBkUp}/Server"&lt;BR /&gt;mkdir -pv "${localBkUp}/Single-Restore"&lt;BR /&gt;&lt;BR /&gt;# Checking if the subfolders cannot be created&lt;BR /&gt;if [[ ! -dw "${localBkUp}/Manager" ]] || [[ ! -dw "${localBkUp}/Server" ]] ; then&lt;BR /&gt;echo "The subfolders in ${localBkUp} cannot be created or the folders are not writable"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Stopping Server and Manager&lt;BR /&gt;launchctl unload "${ServerDaemon}"&lt;BR /&gt;launchctl unload "${ManagerDaemon}"&lt;BR /&gt;&lt;BR /&gt;# Copying the Manager's data&lt;BR /&gt;cp -R "${ManagerDir}/Config" "${localBkUp}/Manager"&lt;BR /&gt;cp -R "${ManagerDataDir}" "${localBkUp}/Manager"&lt;BR /&gt;&lt;BR /&gt;# Restarting Manager service while copying files for Server so it has time to start properly&lt;BR /&gt;launchctl load "${ManagerDaemon}"&lt;BR /&gt;&lt;BR /&gt;# Copying the Server's data&lt;BR /&gt;cp -R "${LibraryDir}" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Config" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Mailboxes" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ProjectDir}" "${localBkUp}/Server"&lt;BR /&gt;cp -R "${ServerDir}/Sessions" "${localBkUp}/Server"&lt;BR /&gt;&lt;BR /&gt;# Start the BackupTool and create project resotre files. Will create BIMProject and BIMLibrary files&lt;BR /&gt;/Applications/GRAPHISOFT/BIMcloud/Server-2018-10-11-3/TeamworkServerBackupTool /Volumes/Test/BACKUPTEST/Single-Restore&lt;BR /&gt;&lt;BR /&gt;# Restarting Server service&lt;BR /&gt;launchctl load "${ServerDaemon}"&lt;BR /&gt;&lt;BR /&gt;echo "Backup complete" | mail -s "Backupstatus" &lt;A href="mailto: mail@mail.com" target="_blank"&gt;mail@mail.com&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Feb 2024 11:07:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Teamwork-BIMcloud/Backupscript/m-p/255623#M6581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-27T11:07:52Z</dc:date>
    </item>
  </channel>
</rss>

