Filestore Module

Introduction 

Filestore module , which is applicable only for FreePBX 15+ has been introduced to take care of "storage" requirement for Backup & Restore module. This provides simple interface to various storage options to store your data safely as per your requirement.

"Servers" (you want to store the backups on) option which was present in FreePBX 14 or older versions in Backup & Restore module is no longer present in Backup & Restore module, "Servers" configuration is now handled by newly introduced independent module called "Filestore". 

Storage options are now handled in the Filestore module which offers user to add multiple storage options like E-mail, FTP, Local, SSh, S3 and newly added Dropbox Account. 

 

                                   

 

 

Filestore module location 


File Store module is present under "FreePBX → Settings → Filestore" 



 

 

Creating Filestore locations

E-Mail

Clicking on Add Email Instance, you can add your E-Mail instance to store your backup. Whenever you run the backup with E-Mail set as the Filestore Location, backup file will be sent as attachment to the Email ID given in the Filestore. E-mail Instance can be used as storage location when your backup file size is very less (Less than 25MB as most of the service providers does not support E-mail attachment with more than 25 MB).

Email List Name

Name this email list.

Description

Description or notes for this server. This will be used as the email subject.

From Email

From Email to set while sending the Email. If this is blank the system will try and determine an appropriate from address.

Email Address

Email address where backups should be emailed to. You may enter 1 Email address per line.

Max Email Size

The maximum size a backup can be to be emailed. Some email servers limit the size of email attachments, this will make sure that files larger than the max size are not sent.

This by default has a maximum size set to 25MB.

FTP

Clicking on Add FTP Instance, you can add your FTP server to store your backup. Whenever you run the backup with FTP server set as the Filestore Location, backup file will be transferred to the FTP servers path you added in the Filestore. If the Backup fails for some reason or could not connect to the FTP instance, then the backup will be stored in local system (/var/spool/asterisk/backup/backup_name/backupfile).

Server Name

Provide the name for this FTP server.

Description

Description or notes for this server.

Hostname

IP address or FQDN of remote ftp host.

Port

FTP port of remote ftp host.

Username

FTP username you want to use to connect to remote ftp host.

Password

FTP password of the user you want to use to connect to remote ftp host.

Filesystem Type

The FTP Server's file system type. If you are unsure set this to Auto.

Path

Path on remote server. This must be a COMPLETE PATH, starting with a / - for example, /home/backups/freepbx. A path without a leading slash will not work, and will behave in unexpected ways.

Transfer Mode

This defaults to 'Passive'. If your FTP server is behind a seperate NAT or Firewall to this VoIP server, you should select 'Active'. In 'Active' mode, the FTP server establishes a connection back to the VoIP server to receive the data. In 'Passive' mode, the VoIP server connects to the FTP Server to send data.

Timeout

Timeout on remote server connection.

Local

Clicking on Add Local Path, you can add your Local Path to store your backup. Whenever you run the backup with Local Path set as the Filestore Location, backup file will be stored in the path you added in the Filestore. If the Backup fails for some reason or could not create the backup file in Local Path, then the backup will be stored in local system (/var/spool/asterisk/backup/backup_name/backupfile).

Path Name

Provide the name for this File Store.

Description

Description or notes for this file store.

Path

Path on this local system.

Dropbox

Clicking on Add Dropbox Account, you can add your Dropbox Account to store your backup. Whenever you run the backup with Dropbox Account set as the Filestore Location, backup file will be transferred to the Dropbox Account's path you added in the Filestore. If the Backup fails for some reason or could not connect to the Dropbox Account, then the backup will be stored in local system (/var/spool/asterisk/backup/backup_name/backupfile).

Account Name

Provide the name for this server.

Description

Description or notes for this server.

Token

Dropbox Access Token. Use steps below to generate one. 

Path

Leave this empty in most cases. It is the path within the app folder on dropbox. 

 

 

Generating the access token

1) You need to login to your dropbox account and go to Dropbox App Console (https://www.dropbox.com/developers/apps) .

Create app for FreePBX Backup and give the dropbox permission as required

 

2) Once the app is created click on the apps to see app info and click on oauth 2 Generate Access token button to generate the access token

 

3) Once the Access token is generated copy the access token and paste in FreePBX Token field

 

 

4)Go to the Permissions tab and set the correct permissions as shown below. 

SSH

Clicking on Add SSH server, you can add your SSH server to store your backup. Whenever you run the backup with SSH server set as the Filestore Location, backup file will be transferred to the SSH servers path you added in the Filestore. If the Backup fails for some reason or could not connect to the SSH server, then the backup will be stored in local system (/var/spool/asterisk/backup/backup_name/backupfile).

Server Name

Provide the name for this SSH server.

 

Description

Description or notes for this SSH server.

 

Hostname

IP address or FQDN of remote SSH host.

 

Port

SSH port of remote SSH host.

 

Username

SSH username you want to use to connect to remote SSH host.

WarmSpare

NOTE if following our warm spare guide use root.

 

Key

Location of ssh private key to be used when connecting to a host. NOTE if you're setting up warm spare it will be  /home/asterisk/.ssh/id_rsa.

WarmSpare

NOTE if you're setting up warm spare use the following key: /home/asterisk/.ssh/id_rsa.

Supported key algorithm

Currenlty filestore module supports only RSA public-key algorithm for SSH key

 

Path

Path on the remote SSH server where you want to save your backup.

S3

Clicking on Add S3 Bucket, you can add your S3 Bucket to store your backup. Whenever you run the backup with S3 Bucket set as the Filestore Location, backup file will be transferred to the S3 Bucket's path you added in the Filestore. If the Backup fails for some reason or could not connect to the S3 Bucket, then the backup will be stored in local system (/var/spool/asterisk/backup/backup_name/backupfile).

Local Display Name

Provide the name for this AWS Account.

Bucket Name

Bucket name that you created in AWS Account.

Description

Description or notes for this AWS Account.

AWS Region

Provide the region provided in AWS Account.

AWS Access Key

AWS Access Key ID Generated by your AWS Account.

AWS Secret

AWS Secret Access Key Generated by your AWS Account.

Path

Path on the remote AWS account where you want to save your backup.

 

 

Return to Documentation Home I Return to Sangoma Support