Last active
August 29, 2015 14:18
-
-
Save abiyasa/734083e51ec8111df272 to your computer and use it in GitHub Desktop.
Script to backup a project folder to a 7Z file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Project to backup | |
PROJECT_NAME="myproject" | |
PROJECT_FOLDER="../works/myproject" | |
# Filename will be myproject-20150424.7z | |
NOW=$(date +"%Y%m%d") | |
FILE="$PROJECT_NAME-$NOW.7z" | |
# will backup all files expect the ones inside node_modules & .build folder | |
echo "Backing up to $FILE, please wait..." | |
7za a -t7z $FILE $PROJECT_FOLDER/. -xr\!node_modules -xr\!.build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment