tar.zip error during save

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm making a save script to save somes folders in my /home. To do that I loop the nomber of folder in /home, and launch a save for each of them. These folder contain jar file, and some .txt . properties and other folder in here. First time I launch the script it was working great, I modify it and same, but yeterdstay when I try some feature It going wrong and I don't find why :/

I have this error when I use the tar -cjf command to create .tar.zip archive »

tar: home/myFolder : impossible stat: no file or folder of this type

backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate 
mkdir $dirbackup 
list_dossier=`ls ../home`

for server in $list_dossier 
do

    tar -cjf $dirbackup/$server.tar.zip home/$server

done

EDIT I'm trying to keep this shape of save : a folder with name the date, and in it, X archves contain my X folders of my /home

#!/bin/bash
backupdate=$(date +%Y-%m-%d)
dirbackup=/save/$backupdate
mkdir $dirbackup

for server in /home/*
do
    echo $server"test"
    tar -cjf $dirbackup$server.tar.zip $server

done

exit
profilepic.png
manpreet 2 years ago
backupm.tuteehub.com/tag/d">date=$(m.tuteehub.com/tag/d">date +%Y-%m-%m.tuteehub.com/tag/d">d) 
m.tuteehub.com/tag/d">dirbackup=/save/$backupm.tuteehub.com/tag/d">date 
mkm.tuteehub.com/tag/d">dir $m.tuteehub.com/tag/d">dirbackup

finm.tuteehub.com/tag/d">d ../home -type m.tuteehub.com/tag/d">d -not -name "." -a -not -name ".." -exec tar -cjf $m.tuteehub.com/tag/d">dirbackup/'{}'.tar.bz2 '{}' \;

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.