Important note about SSL VPN compatibility for 20.0 MR1 with EoL SFOS versions and UTM9 OS. Learn more in the release notes.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is possible to enable FTP and email backup at the same time?

Hi!. It's possible this? All my firewalls have email scheduled backup. But now, I want to enable FTP without disabling email.

On the other hand, I have read this post and think it's an important feature for FTP backups.

Thanks.



This thread was automatically locked due to age.
Parents
  • As you've already know, enabling both isn't possible. However, if you need this functionality now, you could initiate an FTP upload via the API like this:

    import requests
    
    # Setup
    sophos_api_url = 'https://sophos:4444/webconsole/APIController'
    sophos_api_username = 'admin'
    sophos_api_password = 'password'
    
    # Prepare XML Request
    xml = f"""
    <Request>
      <Login>
        <Username>{sophos_api_username}</Username>
        <Password>{sophos_api_password}</Password>
      </Login>
      <Set operation="update">
        <BackupRestore_Now>
          <ScheduleBackup>
            <BackupMode>FTP</BackupMode>
            <FTPServer>192.168.0.1</FTPServer>
            <FtpPath>backups</FtpPath>
            <Username>anonymous</Username>
            <Password>anonymous</Password>
            <BackupPrefix>Test</BackupPrefix>
            <BackupFrequency>Never</BackupFrequency>
          </ScheduleBackup>
        </BackupRestore_Now>
      </Set>
    </Request>
    """
    
    # Execute API Request
    response = requests.request('POST', sophos_api_url, files={"reqxml": (None, xml)}, verify=False)
    print(response.text)

    Of course, you'll need to execute such a script via a cron job or some kind of scheduler on an external system, which might not be exactly what you're looking for. This script initiates a "Backup Now" action and should not disrupt any existing backup configurations.




  • Good morning. It is a good idea. But I see the disadvantage that, to enable the API, you need a static IP because in case of change, you would have to go firewall by firewall changing.

    Anyway, I have tried it and it shows me this error:

    <?xml version="1.0" encoding="UTF-8"?>
    <Response APIVersion="2000.1" IPS_CAT_VER="0">
        <Login>
            <status>Authentication Successful</status>
        </Login>
        <BackupRestore_Now transactionid="">
            <Status code="501">Configuration parameters validation failed.</Status>
            <InvalidParams>
                <Params>/BackupRestore_Now/ScheduleBackup/FTPServer</Params>
            </InvalidParams>
        </BackupRestore_Now>
    </Response>

    Thank you

  • I guess it's because I'm not setting the server path correctly. Anyway, I'm not going to use it, as establishing FTP communication over the Internet is not secure. I find it surprising that Sophos works with FTP and not with other more secure protocols such as SFTP.

Reply Children
No Data