Restoring Garoon Using OS Commands

This section describes how to use OS commands to restore data.
During restore, users cannot access Garoon. You have to restore data when users do not have access to Garoon.

For Windows

On Windows, use OS commands to restore data.
This example illustrates the use of MySQL bundled in the installer.

  • Installation identifier: cbgrn
  • MySQL installed directory: C:\Program Files\Cybozu
  • Backup destination: C:\backup\YYYYMMDD
Steps:
  1. Stop the Web server service.

  2. Stop the scheduling service first, and then the MySQL service.

    From the Windows Start menu, select "Administrative Tools" > "Services" to stop the following services:

    • Cybozu_Scheduling_Service_cbgrn
    • Cybozu_Database_Engine_5_0

  3. Confirm that the Garoon service is stopped.

    1. Start Task Manager.
    2. On Windows Task Manager, click the "Processes" tab.
    3. Check that "sched.exe" and "mysqld.exe" are not displayed.

  4. Start the command prompt.

  5. Delete the existing database area and the attachment area.

    rmdir /s /q "C:\Program Files\Cybozu\mysql-5.0\data"
    rmdir /s /q "C:\Program Files\Cybozu\mysql-5.0\files"

  6. Copy the backed up data to the source directory.

    xcopy C:\backup\YYYYMMDD\data "C:\Program Files\Cybozu\mysql-5.0\data" /e /i
    xcopy C:\backup\YYYYMMDD\files "C:\Program Files\Cybozu\mysql-5.0\files" /e /i

  7. Ensure that the Full Control permission is granted to the Everyone group on the directory copied in step 6.

    If not, grant the full control permission to the Everyone group.

  8. Start the MySQL service first, and then the scheduling service.

    From the Windows Start menu, select Administrative Tools > service, and start the following services.

    • Cybozu_Database_Engine_5_0
    • Cybozu_Scheduling_Service_cbgrn

  9. Start the Web server service.

  10. Ensure that Garoon can be accessed correctly.

For Linux

On Linux, use OS commands to restore data.
This example illustrates the use of MySQL bundled in the installer.

  • Installation identifier: cbgrn
  • MySQL installation directory: /usr/local/cybozu
  • Backup destination: /backup/YYYYMMDD
Steps:
  1. Stop the Web server service.

    systemctl stop httpd.service

  2. Stop the scheduling service first, and then the MySQL service.

    systemctl stop cyss_cbgrn.service
    systemctl stop cyde_5_0.service

  3. Execute the following command to confirm that the Garoon service is stopped.

    ps -aux | grep cyss
    ps -aux | grep mysqld

  4. Delete the existing database area and the attachment area.

    rm -rf /usr/local/cybozu/mysql-5.0/data
    rm -rf /usr/local/cybozu/mysql-5.0/files

  5. Copy the backed up data to the source directory.

    cp -rp /backup/YYYYMMDD/data /usr/local/cybozu/mysql-5.0/
    cp -rp /backup/YYYYMMDD/files /usr/local/cybozu/mysql-5.0/

  6. Confirm that the access permissions for the restored data are correctly set.

    The following settings are required to access Garoon.

    • Data stored in /usr/local/cybozu/mysql-5.0/data.
      • Owner: User to execute CGI (for example, apache)
      • Access permissions for the directory and subdirectories: 755
      • Access permissions for files in the directory: 755
    • Data stored in /usr/local/cybozu/mysql-5.0/files
      • Owner: User to execute CGI (for example, apache)
      • Access permissions for the directory and subdirectories: 755
      • Access permissions for files in the directory: 644

    To change access permissions, execute the following commands:

    chmod -R 755 /usr/local/cybozu/mysql-5.0/data
    chown -R (user to execute CGI):root /usr/local/cybozu/mysql-5.0/data
    find /usr/local/cybozu/mysql-5.0/files/ -type d | xargs chmod 755
    find /usr/local/cybozu/mysql-5.0/files/ -type f | xargs chmod 644
    find /usr/local/cybozu/mysql-5.0/files/ | xargs chown (user to execute CGI):root

  7. Start the MySQL service first, and then the scheduling service.

    systemctl start cyde_5_0.service
    systemctl start cyss_cbgrn.service

  8. Start the Web server service.

    systemctl start httpd.service

  9. Ensure that Garoon can be accessed correctly.