fix variables in tar

This commit is contained in:
paukstelis
2022-06-16 20:10:40 -04:00
parent fdc7a38e3d
commit 03a99c28db

View File

@@ -940,7 +940,7 @@ back_up() {
INSTANCE=$1
echo "Creating backup of $INSTANCE...."
d=$(date '+%Y-%m-%d')
sudo -p $user tar -czf $INSTANCE_$d_backup.tar.gz /home/$user/.$INSTANCE -C /home/$user
sudo -p $user tar -czf ${INSTANCE}_${d}_backup.tar.gz /home/$user/.$INSTANCE
echo "Tarred and gzipped backup created in /home/$user"
}
@@ -951,6 +951,7 @@ back_up_all() {
if [ "$instance" == generic ]; then
continue
fi
echo $instance
back_up $instance
done