#!/bin/bash

backup_dir="/home/akshatha/backup" #Define the backup directory

mkdir -p $backup_dir #Create the backup directory if does not exists

timestamp=$(date +'%Y%m%d_%H%M%S')

backup_filename="backup_${timestamp}.tar.gz"

tar czf "${backup_dir}/${backup_filename}" /home/akshatha/shell_script/

echo "Backup created: ${backup_dir}/${backup_filename}"