1753641 Members
5056 Online
108798 Solutions
New Discussion

How to enable dbman to back up to external sftp-server?

 
SOLVED
Go to solution
dasi66
Frequent Advisor

How to enable dbman to back up to external sftp-server?

How to enable dbman to back up to external sftp-server using IP-address of the sftp?

 

What's needed to configure?

5 REPLIES 5
jguse
HPE Pro

Re: How to enable dbman to back up to external sftp-server?

Hello,

As far as I know there is only an FTP option available, and I don't think it will work with SFTP since that is considerably different. To configure the FTP backup server, set its IP as 'Master IP of Backup System' in the Auto Backup settings in DMA, and create a file under iMC\dbman\etc\ called dbman_ftp.conf, which contains:

ftp_ip=1.1.1.1
ftp_user=admin
ftp_password=1234

Replace the values above with your own for the FTP. Then you can select the checkboxes for 'Upload to Backup System' on the Auto Backup settings next to the DBs and save it, and your auto backups will now be uploaded to FTP.

Best regards,
Justin

Working @ HPE
Accept or Kudo
dasi66
Frequent Advisor

Re: How to enable dbman to back up to external sftp-server?

Ok, thanks, and how to specify source dir and dest dir?

And so I have to restart something after the changes? How to verify its working?

jguse
HPE Pro

Re: How to enable dbman to back up to external sftp-server?

The source directory will be the one specified as 'Backup Path' on the Auto Backup configuration page (like C:\dbmanbak). The destination directory can't be configured, it will simply be the root directory of the FTP server.

To verify that your configuration works, simply wait until the next auto backup happens (eg. 04:00 by default) and check if the db files are on the FTP server.

Best regards,
Justin

Working @ HPE
Accept or Kudo
dasi66
Frequent Advisor

Re: How to enable dbman to back up to external sftp-server?

OK, I'll try that. Seems that we could use some improvements here in upcoming releases?

dasi66
Frequent Advisor
Solution

Re: How to enable dbman to back up to external sftp-server?

That not working as I cannot and should not be able to access / on the ftp server. I think at the moment we need to create a cron-job that takes care of the transfer to the right dir. I did like this:

[root@imc ~]# more ftp.sh
#!/bin/bash

HOST="10.10.1.10"
USER="username-ftp"
PASSWD="password"
#Below, grabs files of todays date only.
DATE=`date +%Y%m%d`

ftp -v -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
binary
cd /data/iMC/Backup
lcd /root/Backup
put 127.0.0.1@aclm_db_imc_aclm_db_*${DATE}*
put 127.0.0.1@config_db_imc_config_db_*${DATE}*
put 127.0.0.1@icc_db_imc_icc_db_*${DATE}*
put 127.0.0.1@invent_db_imc_inventory_db_*${DATE}*
put 127.0.0.1@monitor_db_imc_monitor_db_*${DATE}*
put 127.0.0.1@perf_db_imc_perf_db_*${DATE}*
put 127.0.0.1@reportplat_db_reportplat_db_*${DATE}*
put 127.0.0.1@syslog_db_imc_syslog_db_*${DATE}*
put 127.0.0.1@unba_master_unba_master_db__*${DATE}*
put 127.0.0.1@vlanm_db_imc_vlan_db_*${DATE}*
put 127.0.0.1@vnm_db_imc_vnm_db_*${DATE}*
put 127.0.0.1@vxlan_db_imc_vxlan_db_*${DATE}*
put dbman*${DATE}*
put fault*${DATE}*
put icc*${DATE}*
put perf*${DATE}*
put plat*${DATE}*
put report*${DATE}*
put db_catalog*
put db_catalog*.ok

quit

END_SCRIPT


[root@imc ~]# crontab -l
0 7 * * 1 /root/ftp.sh