Modified xz setttings
This commit is contained in:
@@ -8,16 +8,23 @@ if [[ $(whoami) != "root" ]]; then
|
||||
fi
|
||||
#Create directory if it does not exist
|
||||
if [[ ! -d $FINAL_DIR ]]; then
|
||||
echo "Destination directory $FINAL_DIR does not exist. Creating..."
|
||||
mkdir $FINAL_DIR
|
||||
echo "Changing ownership to shmick."
|
||||
chown -r shmick:shmick $FINAL_DIR
|
||||
else
|
||||
echo "Destination directory exists."
|
||||
fi
|
||||
#Sync everything to it
|
||||
echo "Gathering files for the tarball"
|
||||
rsync -aHAXSv --progress --exclude=/dev --exclude=/Red-Vol --exclude=/proc --exclude=/rksmb "/" "$FINAL_DIR"
|
||||
rsync -aHAXSv --progress --exclude=/dev --exclude=/Red-Vol --exclude=/proc --exclude=/rksmb --exclude=/sys --exclude="/.snapshots" --exclude="/run" --exclude="/tmp" "/" "$FINAL_DIR"
|
||||
#And tar it with ZSTD
|
||||
echo "Compressing tarball"
|
||||
cd $FINAL_DIR
|
||||
echo "Working in directory $(pwd)"
|
||||
if [[ -f "$FINAL_DIR/Bit-Frigger.tar" ]]; then
|
||||
tar rvfJ Bit-Frigger.tar.xz $FINAL_DIR
|
||||
tar rvf Bit-Frigger.tar $(pwd) && echo "Running xz..." && xz -vv -z --threads=0 -9 Bit-Frigger.tar --memlimit=$(free -h | grep -v Swap | grep -v total | awk '{print $NF}')
|
||||
|
||||
else
|
||||
tar cvfJ Bit-Frigger.tar.xz $FINAL_DIR
|
||||
tar cvf Bit-Frigger.tar $(pwd) && echo "Running xz..." && xz -vv -z --threads=0 -9 Bit-Frigger.tar --memlimit=$(free -h | grep -v Swap | grep -v total | awk '{print $NF}')
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user