Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

3CX backups corrupted!

Discussion in '3CX Phone System - General' started by Camal, Jul 16, 2015.

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

    Joined:
    Sep 12, 2013
    Messages:
    5
    Likes Received:
    0
    Hi,

    A thunderstorm killed my PBX, and I'm now trying to restore it on new hardware. The BIG problem is that 3CX tells me all my backups are corrupted! I have 3 different backups saved and they are all corrupted according to 3CX... how is this even possible?? I can't extract the zip's manually either, this is a disaster!

    This is the batch file I have used to make the backups:
    Code:
    @echo off
    echo Launching 3CX backup system…
    set hr=%time:~0,2%
    if "%hr:~0,1%" equ " " set hr=0%hr:~1,1%
    3CXBackup.exe backup "C:\# Backups\3CX\3CXBackup_%date:~0,4%%date:~5,2%%date:~8,2%_%hr%%time:~3,2%%time:~6,2%.zip" /callrecordings /voicemails /voiceprompts /callhist /exit
    The backups are at saved locally first and are then copied to a NAS.

    Is there something wrong with the way I have been doing backups?
    Is there any way I can fix this or am I screwed?
     
  2. craigreilly

    craigreilly Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    3,544
    Likes Received:
    298
    / are not valid characters in filenames. Although perhaps your language settings are using something different.
    do an echo on
    Code:
    %date:~0,4%%date:~5,2%%date:~8,2%_%hr%%time:~3,2%%time:~6,2%
    Try this as a start. It works for me.
    Code:
    REM @echo off
    
    REM Keep 10 days of backups on Local.
    cd\
    cd "C:\3cxBackup\"
    forfiles.exe /p C:\3cxbackup /s /m *.zip /d -10 /c "cmd /c del @path"
    
    set today=%date:~-4%%date:~4,2%%date:~7,2%
    set timed=%time:~0,2%_%time:~3,2%_%time:~6,2%
    
    cd "C:\Program Files\3CX PhoneSystem\Bin\"
    3CXBackup.exe backup C:\3CXBackup\3CX.%today%%timed%.zip /callrecordings /voicemails /voiceprompts /callhist /firmware /exit
    
    REM Now copy this to Backup Device or USB
    
    SET today=
    SET timed=
    exit
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Camal

    Joined:
    Sep 12, 2013
    Messages:
    5
    Likes Received:
    0
    Thanks!

    I've managed to find another older backup which worked, so thankfully I no longer need to jump from the roof tonight (pheeeew!!)

    The strange thing is I have not changed anything with the backup procedure and it has worked flawlessly before, but the last three backups has for some reason become corrupted. I need to investigate this further when I have evertything up and running again.
     
Thread Status:
Not open for further replies.