Skip to main content

Execution Archival

Every time an automation runs, it creates execution records in the database. Over weeks and months, these records add up. The archival service automatically moves old records to cold storage so your database stays fast and your storage costs stay low.

"Where do old execution records go?"

They are compressed and moved to long-term storage (S3 or MinIO), organized neatly by date. You do not lose the data — it simply moves somewhere cheaper.

Why Archival Matters​

Without archivalWith archival
Database grows continuouslyDatabase stays a manageable size
Queries slow down over timeQueries remain fast
Storage costs increaseOld records move to cheaper storage
No automatic cleanupRuns on a schedule with no manual effort

The Basic Idea​

Select Old Records
The service finds execution records that are old enough to archive
Compress and Upload
Records are compressed and uploaded to cold storage
Verify Upload
The service confirms the archive file was stored correctly
Remove Originals
Only after verification, the originals are deleted from the database
Simple: old records are compressed, safely moved to cold storage, and then removed from the main database.

Two Archival Modes​

The archival service supports two modes. You can use one or both at the same time.

Time-Window Mode (the default)​

This is the standard mode that applies to all jobs automatically. It archives execution records that fall within a specific age range, while protecting recent records.

SettingWhat it controlsExample
Recent months to keepHow many months of recent data are protected2 months
Archive window (months)How far back to look for records to archive6 months

Example: Suppose recent months to keep is set to 2 and the archive window is 6 months. If archival runs in March:

Protected
January, February, March — too recent to archive
Archived
September, October, November, December — old enough to move
Recent records stay in the database. Older records within the window are moved to cold storage.

Per-Job Count Mode (opt-in)​

Some jobs run very frequently and create a large number of records in a short time. For these jobs, you can switch to count-based archival instead. This mode keeps the N most recent executions per job and archives the rest.

SettingWhat it controlsDefault
Archival enabledTurns on per-job count mode for this jobOff
Executions to keepHow many recent executions to keep100

Example: A job runs every 15 minutes and has 2,000 execution records. With executions to keep set to 100, the archival service keeps the 100 most recent runs and archives the other 1,900.

What Gets Archived​

Each archived record includes the complete picture of that execution run.

DataWhat it contains
Execution recordStatus, start time, end time, trigger details, and result
Step recordsEvery step that ran, including its input, output, status, and duration

Nothing is left behind. When an execution is archived, all of its step details go with it.

Safety: How Your Data Is Protected​

The archival service is designed to never lose your data. Several safety measures work together:

Safety featureHow it works
Upload verificationAfter uploading, the service checks the file size to confirm the archive was stored correctly
Delete only after verificationOriginal records are removed from the database only after the archive is confirmed
Automatic retryIf an upload fails, the service retries up to 3 times with increasing wait times (2 seconds, 4 seconds, 8 seconds)
Batch processingRecords are processed in batches (default: 500 at a time) to prevent memory issues with large datasets
Distributed lockOnly one archival process can run at a time, even across multiple servers
Upload
Archive file is sent to cold storage
Verify
File size is checked to confirm success
Delete
Originals are removed only after confirmation
The verify-then-delete approach ensures your execution data is never lost during archival.

Enabling Per-Job Archival​

To switch a specific job from the default time-window mode to per-job count mode:

  1. Open the job settings.
  2. Find the execution configuration section.
  3. Turn on Archival Enabled.
  4. Optionally set Executions to Keep to a number that makes sense for your job (the default is 100).
tip

For high-frequency jobs that run every few minutes, switch to per-job count mode and set a retention count that covers your typical review window — this prevents the database from accumulating thousands of short-lived records before the monthly time-window archival runs.

Job typeSuggested approach
Runs daily or less oftenTime-window mode (default) is usually fine
Runs hourlyConsider per-job mode with 200-500 executions kept
Runs every few minutesPer-job mode is recommended with a count that covers your review needs

What Archived Data Looks Like​

Archived files are stored in a date-organized structure in cold storage:

LevelExamplePurpose
Folder by yearjob-executions/year=2025/Groups all archives from one year
Folder by monthjob-executions/year=2025/month=06/Groups archives from one month
Archive filebatch-20250615-001.jsonl.gzA compressed file containing execution records

Each archive file is in JSONL.GZ format — one complete execution record per line, compressed with GZIP. This format is compact and easy to process if you ever need to retrieve archived data.

Configuration Overview​

SettingWhat it doesDefault
Archival enabled (master switch)Turns the entire archival service on or off—
ScheduleWhen archival runsMonthly
Recent months to keepHow many months of recent data to protect—
Archive window (months)How far back to look for archivable records—
Executions to keepDefault number of recent executions to keep per job (for per-job mode)100
Batch sizeHow many records to process at a time500
Storage typeWhere archives are storedS3 or MinIO

Common Questions​

Does archival delete my data?​

info

Archival never permanently deletes your data. Records are only removed from the main database after the archive file has been uploaded and verified in cold storage — your execution history is always preserved.

No. Archival moves your data to cold storage. The original records are only removed from the main database after the archive has been uploaded and verified.

Can I still access archived records?​

Yes. Archived records are stored in compressed files in your configured S3 or MinIO storage. They can be retrieved and reviewed when needed.

What happens if an upload fails?​

The service retries up to 3 times with increasing wait times. If all retries fail, the original records stay untouched in the database. Nothing is lost.

How often does archival run?​

By default, it runs monthly. Your administrator can adjust the schedule to run more or less frequently.

Can two archival processes run at the same time?​

No. A distributed lock ensures only one archival process runs at a time, even if your platform runs on multiple servers. This prevents duplicate work or conflicts.

Will archival slow down my automations?​

No. Archival runs on its own schedule and processes records in small batches. It does not interfere with running automations.

How do I know if archival is working?​

Check whether old execution records are being cleaned up from the main database on schedule. Your administrator can also review archival logs for confirmation.

  • Monitoring Automations — how to watch your automations run and check results
  • Logging — how to read detailed step messages and troubleshoot failures