Hello guys, I am trying to make a backup of my folder through crontab using this syntax ( every tuesday at 20:30 and must to be compressed version on debian )
30 20 ** 2 tar -xvzf backup.tar.gz -C /home/mirec
I appreciate your help 
Hello guys, I am trying to make a backup of my folder through crontab using this syntax ( every tuesday at 20:30 and must to be compressed version on debian )
30 20 ** 2 tar -xvzf backup.tar.gz -C /home/mirec
I appreciate your help 
Please use code tags as required by forum rules!
Does it work? Doesn't it?
The two asterisks should be separated by a space...
there is a space but doesn't work
tar 's x function extracts from an archive, it does not create one.
30 20 ** 2 tar -cvf backup.tar -C /home/mirec well then is this corectly ? 
Please use code tags as required by forum rules!
That would create an uncompressed archive, given there were a space between the ** . Not sure what the -C (change to directory DIR) will do or not do. Try dropping it.
alright I have no idea how to do it corectly but thanks for your help 
You're almost there. Why don't you schedule it five minutes from now, give it a small subset to work on, and check the results. Then do some fine tuning...
30 20 ** 2 tar �cz /home/user1 > /home/user1/backup.tar.gz
Is it alright ?
Sigh...
RudiC has told you two times now to separate the two asterisks by a space. The line as you present it is still wrong because of that and no matter what options to tar you try will change anything about that BECAUSE THIS IS NOT THE PROBLEM IN FIRST PLACE!
Try a layered approach: first, consult the man pages of cron and learn how to configure a (any) command to be run by cron. Only then concern yourself with constructing the correct tar-command: first manually. When it finally does what you want it to do put it into cron using your new-found expertise on creating cron-jobs.
So much as a starter: cron jobs have NOT the same environment as commands run from an interactive session, namely the PATH variable is empty and therefore you should use full pathnames. instead of tar <cmd> /some/path you need to write something like /usr/bin/tar <cmd> /some/path . Notice the full path to the command. Your path might differ, but you can easily get the (on your system) correct path with the which command:
# which tar
/usr/bin/tar
I hope this helps.
bakunin
ok so: 20 20 * * * sudo tar -cvpzf backup.tar.gz /home/user1
and backup will be in /root right ?
probably, maybe, ... i don't know. Most probably there will be no backup at all, just a mail to root about a command not found. Do i need to repeat what i said about using full pathes three times too before you take the suggestion into consideration as with the space between the asterisks?
The command will be executed every day at 20:20 but "sudo" will probably be not found at all, as well as "tar".
I hope this helps.
bakunin
i got it, everything works ! thank you for your patience ! !