Google Drive backup failures

Discussion in '3CX Phone System - General' started by mcbsys, Mar 23, 2017.

Thread Status:
Not open for further replies.
  1. mcbsys

    mcbsys New Member

    Joined:
    Oct 8, 2008
    Messages:
    170
    Likes Received:
    14
    I've turned on Google Drive for backups in a v15 SP5 install. It usually works fine but sometimes it fails, now two days in a row.

    Is there a way to keep backups locally and on Google Drive? Google Drive is okay as a backup-backup but I'm not confident in it for first-line backups.

    Changing the backup naming convention to be date-based would help, e.g "3CXScheduledBackup.20170322.zip". It's rather awkward to have to rename all previous backups every day, and it makes it difficult to find backups for a specific day on Google Drive, which shows the same date for all files. In fact, it looks like the rename is what is failing, which has left my Google Drive in a rather confused state:

    3CX Backups on Google Drive.png

    Here's the message from the failure email:

    3CX Phone System tried to backup but failed due to the following reason(s):
    The service drive has thrown an exception: Google.GoogleApiException: Google.Apis.Requests.RequestError Precondition Failed [412] Errors [
    Message[Precondition Failed] Location[If-Match - header] Reason[conditionNotMet] Domain[global] ]
    at Google.Apis.Requests.ClientServiceRequest`1.Execute()
    at GoogleDriveImpl.GdFolder.MoveFile(String fromName, String toName)
    at BackupRestoreSchedule.BackupJob.RotateFiles(IFilesystem filesystem, Int32 count, String filename)
    at BackupRestoreSchedule.BackupJob.Execute(IJobExecutionContext context)​
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. NetVu IT

    Joined:
    Mar 16, 2017
    Messages:
    21
    Likes Received:
    0
    Hi,

    Did you manage to resolve this?

    I'm getting a similar error when using scheduled backups.

    3CX Phone System tried to backup but failed due to the following reason(s):
    System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
    --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
    at Google.Apis.Upload.ResumableUpload`1.Upload()
    at GoogleDriveImpl.GdFile.Close()
    at System.IO.Stream.Close()
    at _3cxBackupRestoreImpl.BackupRestoreUtils.Backup(IFilesystem filesystem, String instanceId, String cfgPath, String dbConnectionString, BackupConfig options, String fullpathFilename, Boolean sendEmail)
    at BackupRestoreSchedule.BackupJob.Execute(IJobExecutionContext context)
    ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---

    Manual backups report as successful, but the file size in Google Drive is 0B and if I try to download them I get a "Forbidden" error.

    I've tried de-authorising the account and disabling the schedule, then switching backup locations. I've then re-authorised Google Drive and it allows me to browse the directory structure and set the destination. But again manual and scheduled backups fail.
     
  3. mcbsys

    mcbsys New Member

    Joined:
    Oct 8, 2008
    Messages:
    170
    Likes Received:
    14
    I'm still working on this with support. In my case, it only fails about once a week, and manual backup works fine. So I think it's a different issue. Yours says "A task was canceled." I wonder why it would cancel? How is your Internet speed? Could it be timing out?

    I'd suggest opening a support ticket if you have that option.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.