Backup-Restore

Backup & Restore

  1. There is an inbuilt solution for taking and restoration of Backup. There is a scheduled backup runs on midnight daily
  2. You can configure how many number of backups to keep.
  3. You can download the backups from neuCRM at Admin → Auto → Backup menu or another way you can connect via FTP and download the backup. Restore from Backup option is also provided.
  4. You can also download / upload the Backups on neuCRM. The FTP username, password and port configuration details can be configured at Admin → Server → FTP Backup Menu.
  5. Incase of power failure or abnormal shutdown your VM, you may have the chance of Virtual Hard disk corruption. In this case, often clone your Running copy of VM's Virtual Hard disk
  6. Please refer your VM Application software manual for How to Clone VM and restore from Clone. Also know How to Take Snapshot of VM and how to restore from Snapshot. This will save you lot!.
  7. If you can't restore neuCRM for wahtever reason, the another solution is that, Download a fresh copy of neuCRM VM from http://neucrm.com and use Restore option by using the your previous Backups that you have downloaded from your previous working version of neuCRM package.
  8. At last one thing you must do with caution. i.e. Proper shutdown the Virtual Machine. Always use ACPI Shutwown from VM menu or choose Send the Shutdown signal option. Do not use Power Off the Machine.

FTP access to neuCRM Server

Access to the files like Customer Documents, Web Access Logs, System Backup files enabled through FTP login on neuCRM Server. Before accessing through FTP, it server must be configured at Admin → Settings → Server → FTP Backup menu. This menu is accessible by serveradmin only.

There you must configure FTP Password and Allowed IP Address2. Untill otherwise all configurations are configured perfectly you could not login via FTP.

You can also automate the Downloading of DB Backup by using the script below:

#!/bin/sh

FTP_USER="backup"
FTP_PASSWORD="password_as_configured"
FTP_SERVER="192.168.1.100"
FTP_PORT="2121" # do not change it
LOCAL_DOWNLOAD_DIR="/media/backup/neucrm/db_backup/"

# please note that your client IP must be in Allowed_IP2 list in neuCRM config, otherwise you won't get connected

[ -d $LOCAL_DOWNLOAD_DIR ] || exit "$LOCAL_DOWNLOAD_DIR not exists";
cd $LOCAL_DOWNLOAD_DIR && wget -r -N -nH --cut-dirs=1  --ftp-user="$FTP_USER" --ftp-password="$FTP_PASSWORD" ftp://$FTP_SERVER:2121/backup/*.sql.gz.enc

echo "Removing Old Backup Files beyond 10 days..."
find $LOCAL_DOWNLOAD_DIR/ -type f -mtime +10 | xargs rm -f
echo "Done"