Skip to content

Instantly share code, notes, and snippets.

@Alir3z4
Created November 7, 2012 12:36
Show Gist options
  • Save Alir3z4/4031372 to your computer and use it in GitHub Desktop.
Save Alir3z4/4031372 to your computer and use it in GitHub Desktop.
dummy bk file
#!/bin/bash
# Author Alireza Savand
# CopyRight 2012 Alireza Savand
# Back up
echo "==========================================="
echo "Start to get /home/vmail dir backup"
echo "==========================================="
echo ""
echo "Compressing format gzip2"
echo ""
# SAVE/Backup File Name [full path]
FILE_PATH="/opt/backup/vmail-backup/vmail-backup-[$(date +%F_%H-%M-%S)].tbz2"
echo "Save to ${FILE_PATH}"
tar -jcvf $FILE_PATH /home/vmail || return 1
echo "Compressed and moved to $FILE_PATH"
# end of the file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment