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.



Added TAGs
[edited by: Erick Jan at 11:44 AM (GMT -7) on 18 Mar 2024]
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.




Reply
  • 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.




Children