HAProxy Enterprise Documentation 2.4r1

clear map

Delete all entries from a Map file.

Description

A Map file contains a list of key-value pairs. You can reference the file on an acl line by using the -M and -f /path/to/file flags. Use clear map to remove all entries from a Map file. Note that this only removes them from HAProxy Enterprise's runtime memory and not from the file on disk.

Examples

In this example, we delete all entries from the Map file /etc/hapee-2.4/maps/hosts.map:

$ echo "clear map /etc/hapee-2.4/maps/hosts.map" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.4/hapee-lb.sock

In this example, we delete all entries from version 3 of the map file indicated by ID 2:

$ echo "clear map @3 #2" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.4/hapee-lb.sock

See also


Next up

clear table