public static int CreateBackupZip(int packageId, string archivePath)
        {
            // check account
            int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);

            if (accountCheck < 0)
            {
                return(accountCheck);
            }

            // check package
            int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);

            if (packageCheck < 0)
            {
                return(packageCheck);
            }

            // place log record
            TaskManager.StartTask("FILES", "ZIP_FILES", archivePath, packageId);


            try
            {
                OS.OperatingSystem os          = FilesController.GetOS(packageId);
                string             zipFilePath = FilesController.GetFullPackagePath(packageId, archivePath);
                string             rootFolder  = FilesController.GetFullPackagePath(packageId, "");
                os.CreateBackupZip(zipFilePath, rootFolder);

                return(0);
            }
            catch (Exception ex)
            {
                //Log and return a generic error rather than throwing an exception
                TaskManager.WriteError(ex);
                return(BusinessErrorCodes.ERROR_FILE_GENERIC_LOGGED);
            }
            finally
            {
                TaskManager.CompleteTask();
            }
        }