Actions107
- Node Actions
- Network Actions
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Volume Actions
- Swarm Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
- Config Actions
- Plugin Actions
- Distribution Actions
- Session Actions
Overview
This node allows interaction with Docker containers through the Portainer API. Specifically, the "Container Archive" operation enables users to create an archive of a specified resource (file or directory) inside a Docker container's filesystem. This is useful for backing up files, exporting data, or transferring container contents.
Common scenarios include:
- Exporting logs or configuration files from a running container.
- Backing up application data stored inside containers.
- Extracting specific files or directories for analysis or migration.
Example: Archiving the /var/log/nginx directory from a web server container to download and inspect logs.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The Portainer endpoint identifier used to access the Docker environment. Choose from a list or specify an ID via expression. |
| Id | The ID or name of the Docker container from which to archive files. |
| Path | The path inside the container’s filesystem that you want to archive (file or directory). |
Output
The node outputs JSON data representing the response from the Portainer API when requesting the archive of the specified container path. Typically, this would be metadata about the archive or a link to download it.
If binary data is returned (e.g., the actual archive file), it would represent the archived content of the specified path inside the container.
Dependencies
- Requires a Portainer API instance accessible via an endpoint URL.
- Needs an API key or token credential configured in n8n to authenticate requests to the Portainer API.
- The node uses the Portainer API endpoint
/api/endpoints/{endpointId}/dockerto interact with Docker.
Troubleshooting
- Invalid EndpointID: Ensure the selected endpoint exists and is reachable. Use the dropdown or provide a valid ID.
- Container Not Found: Verify the container ID or name is correct and the container is running.
- Path Does Not Exist: Confirm the specified path exists inside the container’s filesystem.
- Authentication Errors: Check that the API credentials are valid and have sufficient permissions.
- Network Issues: Make sure the n8n instance can reach the Portainer API URL.