Automation Scripting for Operations Questions

Writing scripts and tooling to automate operational and delivery tasks: shell and Python scripting, glue automation, toil reduction, and operational efficiency. Covers automating repetitive infrastructure and deployment work and building internal tooling that raises operational leverage. The concern is task-level automation and scripting, distinct from full pipeline or infrastructure-as-code frameworks.

HardTechnical
116 practiced

Design the core algorithm and provide pseudocode for a Python file sync tool that reconciles a large local directory tree to remote object storage (e.g., S3). Requirements: avoid re-uploading unchanged files using checksums, support chunked multipart uploads for large files, resume interrupted uploads, run with concurrency limits, and be resilient to partial failures. Explain data structures for tracking state, how to detect renames vs new files, and how to implement resume tokens.

MediumTechnical
96 practiced

Write a production-safe log rotation script (choose Bash or Python) that compresses logs older than 7 days into gzip archives, keeps most recent N compressed archives per service, verifies archive validity before deleting originals, and is safe to run concurrently for different services. Ensure idempotency and consider partial failures.

EasyTechnical
96 practiced

In Python 3, implement a small CLI skeleton using argparse with subcommands backup and restore. Requirements: global --verbose and --dry-run flags, backup --path PATH must validate that PATH exists, restore --version VERSION must accept a version string. The submission should focus on argument parsing, validation, help text, and exit codes (0 success, 1 runtime error, 2 for usage). You do not need to implement real backup logic, only the CLI structure and validation.

MediumTechnical
89 practiced

Automate a simple operational task: write a short script (language: Python) or pseudocode that monitors a process by name, restarts it if it exceeds 75% memory for 5 minutes, and applies exponential backoff for restarts up to 4 attempts before escalating. Describe how you'd test this automation safely.

MediumSystem Design
75 practiced

You have a pipeline of automation steps: provision VMs, deploy service, migrate DB, update DNS. Design a script-based orchestrator (not a full workflow engine) that runs these steps in order, records state so it can resume after failures, supports compensating rollback for each step, and exposes run status for operators. Describe data structures, state persistence, idempotency requirements, and how to implement resume and manual intervention.

Unlock Full Question Bank

Get access to all 49 Automation Scripting for Operations interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.