BashintermediatedevopsAI generated

Automated Backup Rotation Tool

A backup script that tars and compresses a set of directories, timestamps the archive, uploads it to a remote host via scp, and enforces a retention policy such as keeping daily copies for a week and weekly copies for a month. Learners practice tar/gzip, scp/ssh, and date-based retention logic.

Estimate
~10h
Steps
5
Completed by
0
Proposed by
codeseed.app

tar · gzip · scp · ssh

Project roadmap

  1. 01

    Write the archive creation step

    ~1.5h

    Tar and gzip the configured source directories into a timestamped filename.

  2. 02

    Add remote transfer over SSH

    ~2h

    Use scp to copy the archive to a remote backup host, with retry logic on transient failures.

  3. 03

    Implement retention policy logic

    ~3h

    Write logic that inspects existing backups by date and deletes ones outside the retention window (daily/weekly/monthly tiers).

  4. 04

    Add integrity verification

    ~1.5h

    After transfer, verify the remote archive's checksum matches the local one before deleting old backups.

  5. 05

    Add a restore helper script

    ~2h

    Write a companion script that lists available backups and restores a chosen one to a target directory.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~10h · 5 steps

Tech stack

targzipscpssh