backup all your work done till now

PHOTO EMBED

Thu Dec 28 2023 12:54:22 GMT+0000 (Coordinated Universal Time)

Saved by @achendel

#!/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}"

content_copyCOPY