Automated FTP Backups

From Swivel Knowledgebase
Jump to: navigation, search


Overview

How to copy the automated daily backup from the appliance, to an external FTP server. The automated backup runs, by default, at 4am and if configured the appliance will then automatically copy the backup file to an FTP server.

Also see Automated SCP Backups


Prerequisites

PINsafe appliance

FTP Server


Symptoms

Automated copy of backup files required to central FTP server


Solution

1. Login to the CMI using admin on the console

2. Select "Backup & Restore Options"

3. Select "Advanced"

4. Select "FTP Backups"

5. Select "Enter FTP server"

Enter the credentials for the server:

 IP
 Name
 Password
 Destination directory


Known Issues

PINsafe does not and cannot manage the files on the FTP server. The FTP server should be monitored to see that:

  • Files are backed up
  • Disk space is not exceeded
  • Backups are purged as required (The CMI Purge Backups can only handles the local backups)


Troubleshooting

Check that the backup files are copied to the required location.

Verify that the FTP username and password is correct.

Verify the backup server and path is accessible.

From the command line FTP to the FTP server using the username and password on the PINsafe FTP configuration, copy a test file.

Example:

 [admin@swivel backups]# ftp ftpserverhostname
 Name (ftpserverhostname:root): pinsafe
 331 Password required for pinsafe
 Password:
 230 Logged on
 Remote system type is UNIX.
 ftp> ls
 227 Entering Passive Mode (ftpserverhostname) 150 Connection accepted
 -rw-r--r-- 1 ftp ftp              0 Jul 30 08:17 pinsafe.txt
 226 Transfer OK
 ftp> put backup_full.tar.gz
 local: backup_full.tar.gz remote: backup_full.tar.gz
 227 Entering Passive Mode (ftpserverhostname) 150 Connection accepted
 226 Transfer OK
 24150359 bytes sent in 3.5 seconds (6.7e+03 Kbytes/s)
 ftp> ls
 227 Entering Passive Mode (ftpserverhostname) 150 Connection accepted
 -rw-r--r-- 1 ftp ftp              0 Jul 30 08:17 pinsafe.txt
 -rw-r--r-- 1 ftp ftp       24150359 Aug 12 11:29 backup_full.tar.gz
 226 Transfer OK
 ftp> quit
 221 Goodbye


To manually run the backup script from the command line:

/etc/cron.daily/PINsafe_backup_all.sh

The following shows a failed FTP login. A successful login will display no message.

 /etc/cron.daily/PINsafe_backup_all.sh
 ############################################################
        Backup Started : Wed Sep 28 09:49:48 GST 2011
 ############################################################
 
 Copying network configuration
 Copying Keystore, ssh, snmp and /etc/profile
 Copying MySQL: "mysql" DB
 Copying MySQL: "pinsafe_rep" DB
 Copying Tomcat webapps and log files
 Copying DRBD
 Copying Webmin
 Copying MON
 Copying Heartbeat
 Copying scripts
 
 ############################################################
        Backup Finished : Wed Sep 28 09:49:49 GST 2011
 ############################################################
 Cannot login User qwerty cannot log in.