Atlantiraptor Docs

Server.Utils.BackupDirectory

Type: Server event (monitoring)

Automatically exports and backs up completed flow results to a specified directory on the server.

Required permissions: SERVER_ADMIN

Parameters

Name Type Default Description
ArtifactNameRegex regex . A regular expression to select which artifacts to upload
BackupDirectoryPath string A directory on the server to receive the uploaded files.
RemoveDownloads bool If set, remove the flow export files after upload

Source

Defined in artifacts/definitions/Server/Utils/BackupDirectory.yaml.

name: Server.Utils.BackupDirectory
description: |
  Automatically exports and backs up completed flow results to a
  specified directory on the server.

type: SERVER_EVENT

parameters:
   - name: ArtifactNameRegex
     default: "."
     description: A regular expression to select which artifacts to upload
     type: regex

   - name: BackupDirectoryPath
     description: A directory on the server to receive the uploaded files.

   - name: RemoveDownloads
     type: bool
     description: If set, remove the flow export files after upload

required_permissions:
  - SERVER_ADMIN

sources:
  - query: |
      LET completions = SELECT ClientId, FlowId,
         client_info(client_id=ClientId).os_info.fqdn AS Fqdn,
         create_flow_download(client_id=ClientId,
             flow_id=FlowId, wait=TRUE) AS FlowDownload
      FROM watch_monitoring(artifact="System.Flow.Completion")
      WHERE Flow.artifacts_with_results =~ ArtifactNameRegex

      SELECT upload_directory(
         output=BackupDirectoryPath,
         name=format(format="Host %v %v %v.zip",
                     args=[Fqdn, FlowId, timestamp(epoch=now())]),
         accessor="fs",
         file=FlowDownload) AS Upload
      FROM completions
      WHERE Upload OR
        if(condition=RemoveDownloads,
           then=rm(filename=file_store(path=FlowDownload)))

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.