3CX: Use Rsync on Windows to Create Redundant Copies for 3CX Backups and Recordings

In a recent article, we showed how to use the Linux Rsync utility to create redundant copies for your backups and recordings. If you keep your 3CX backups and archived recordings on Windows, you too can enjoy the same flexibility, by taking advantage of the “Windows Subsystem for Linux” (WSL) option. Enabling this option allows you to launch a Linux command shell, followed by the rsync utility, right from your Windows Powershell command prompt. Read on to find out how to perform this cross-platform trick.

Enable Windows Subsystem for Linux (WSL)

To use rsync on Windows, you need to enable WSL:

  • On Windows 10:
    1. Go to “Settings” > “Apps” > “Apps & features” > “Programs and Features”.
    2. Click on “Turn Windows features on or off” and scroll down to enable the “Windows Subsystem for Linux” option.
    3. Click on “OK” and restart your PC when you are prompted.
  • On Windows Server 2019, the procedure can be performed with a single command. Open a PowerShell command prompt as Administrator and:
    1. Run this command:
    2. Restart your computer when prompted, to ensure that WSL can initiate a trusted execution environment.

After restarting your Windows machine, WSL will be available to use for this purpose.

Mirror, Mirror on the Wall, Keep my Backups Safe from All

With the Windows Subsystem for Linux (WSL) now enabled on your Windows machine, you are ready to use rsync and mirror your 3CX backups and recordings. Keep in mind that you need a destination host, i.e. setup a Linux machine running the rsync service or a NAS (Network Attached Storage) device on the cheap.

Rsync test run on Windows via WSL

Open a command prompt as Windows administrator and:

  1. Change to your 3CX backups or archived recordings folder, e.g.:
  2. Run the Linux bash shell from within your current command prompt:
  3. Verify that rsync is available on both machines by running rsync in test run mode (–dry-run) from your Windows host. Ensure that you have proper user permissions on both the source and destination directories:
  4. You will be prompted to enter the password for the user on the destination machine to test the rsync transfer. Provide the password to perform the rsync test run and verify the transfer size and related stats.

Follow the command syntax “rsync [options] [source] [destination]” as provided in the example above and note that:

  • Options are chained as “–dry-run -avr”, i.e. “–dry-run” for test run, “a” for archive mode, “v” for verbose operation, “r” to recurse into the source directory.
  • The source directory is on your Windows machine converted to a Linux path and mounted under “/mnt”, e.g. “/mnt/c/Users/PBXadmin/3cx_backups”.
  • The destination directory, e.g. “/home/3cxrsync/redundant_backups”, is on the Linux rsync machine, e.g. ”rsyncsrv.example.com” and accessible by the specified user, e.g. “3cxrsync”. If you need to create a directory on the Linux host, use the “mkdir” command, e.g. “mkdir backups”.
  • Note that rsync transfers can be configured with a multitude of options, e.g. “-o” and “-g” preserve the owner and group permissions on the transferred files. Adding “z” implies compression during transfer, while “–progress” provides status updates during the file transfer. You can study all the rsync options in detail by running:
    • rsync --help

Mirroring Your 3CX Data from Windows to Linux

Mirror backups with rsync on Windows

After verifying that rsync works on both machines, you can proceed to mirror your 3CX data. Structure the rsync command in your case based on this example:

rsync -navzhr /mnt/c/Users/PBXadmin/3cx_backups 3cxrsync@rsyncsrv.example.com:/home/3cxrsync/redundant_backups

Make sure you update all paths, user and host specs to fit your network environment parameters. When you finish transferring your 3CX backups, you can repeat the command for your archived recordings, updating the source and destination for the transfer as required.

Congratulations! You can now keep your 3CX PBX safe with rsync, mirroring backups and archived recordings from Windows to Linux.

Sourced from: 3CX Blog.
View the original article here.

Have you checked out the new WhichVoIP.co.za website as yet? Benchmark your services against your peers, have a look at what your competitors are doing, get listed in the best Telecoms provider directory in South Africa, and advertise on the site to attract customers to your page where you can view page hits, respond to reviews, load adverts, and more. Visit WhichVoIP.co.za or jump to a leading comparison section:

  • Compare VoIP providers

  • Compare Hosted PBX providers

  • Compare Telephone systems

  • Compare VoIP phones

  • Compare Fibre offers

  • Compare Wireless providers

    Enjoy the site!


  • About Telecoms-Channel

    Telecoms-Channel.co.za is your one-stop source for the latest news and insights from the telecoms industry in South Africa, where you get comprehensive coverage of the industry and keep up with the ever-evolving market landscape.

    Whether you need to understand market trends, identify new opportunities, or stay informed of the latest developments, we have you covered.

    In addition to bringing the best news together, we have access to an extensive supplier network that makes it easy for any telecoms company looking to tap into new markets or enter the telecoms industry. Take advantage of our expertise and contact us today to find your next partner!

    Other posts you might be interested in

    Ericsson LG
    Industry News

    Ericsson-LG’s Key Trends Shaping the Future of Enterprise Communication

    Ericsson-LG is at the forefront of transforming the business communications landscape. By harnessing the power of artificial intelligence, cloud technology, and robust cybersecurity, the company is empowering businesses to enhance productivity, streamline operations, and improve customer experiences.

    Cloud PBX Solutions

    Request Once, Get Multiple Quotes - Save Thousands!