howto backup your PBX to a windows network share:

Status
Not open for further replies.

nobody

Bronze Partner
Joined
Aug 15, 2017
Messages
500
Reaction score
57
3CX makes it difficult to backup the system to a windows network share. only google, ftp or local drive is an option.
If you run 3cx on a windows machine (not on a virtual server) it is not simple to create a backup unless you install a ftp server on your file-server. Even using a symlink mapped to a windows share to backup to a local folder will not work.
However you can use a virtual disk for the backup:
use the diskmgmt.msc snap in to create a vhdx virtual disk on a network share
create a diskpart script on the local machine, contents:

select vdisk file="\\fileserver\pbx-backup\pbx-backup.vhdx
attach vdisk
select part 1
assign letter=D

save that as c:\disk-part-mount.txt on the local disk
create a schedule with the taskschd.msc:
general : create the schedule using a saved local administrators account
trigger: on system start
action: run a program: diskpart
arguments: /s c:\disk-part-mount.txt
save and reboot
the vhdx should now be mounted automatically
run the 3cx backup assistant and point it to the local drive d:

I dont understand why 3cx makes it so hard to create a backup on a windows server , but using this receipe is is possible.
 
The problem is you are trying to make 3CX backup do something it's not intended to do. 3CX never claimed to backup to a network share so you can't really say they make it difficult.

Your method, while obtuse, does work. An easier method would be to just use mklink (like symlink on linux) to make the network share appear as a folder. You could of course also just schedule a script run to copy the local backup folder to your share, or you could simply share the local folder and have your backup software (if that's what you are ultimately using) pull the backups via network share. You could also just use the command line backup instead:

https://www.3cx.com/docs/backup-restore-command-line/
 
cobaltit,
I tried first to make a symlink (windows 10 pro april 2018), but, it did not work - no permissions. activated Developer mode, but also, no success.
Of course, I know 3cx does not promise to make a backup to a file share possible. (it worked in versions when 3cx was built around windows if I remember correct). I still think it a little more effort to make this work would be a good thing as long as the software is able to run under the Windows OS.
 
Last edited:
Hmm I never actually tried the symlink method but assumed it would work. Just don't really have many use cases anymore. Pretty much all our installs are either Debian, Google Cloud or just backing up the VM so local backup works. I guess it just depends on what .Net function they are using to enumerate local drives and how it handles with symlinks although I do almost no coding so I'll probably never get that bored to look. But I think making a two-step backup and just scripting the copy off to the share or using the command line backup is probably the easier route.
 
You could use iSCSI ....

That would make the 'share' appear as a local drive.
 
Status
Not open for further replies.

Forum statistics

Threads
111,905
Messages
589,653
Members
164,771
Latest member
mjwhyman