Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@mail scripts]# cat respmail
- DATE=`date +"%F.%Hh.%Mm.%Ss"`
- DIR="/backup/mail/02Server-$DATE"
- mkdir $DIR
- tar czvf "$DIR/$DATE.tar.gz" "/var/mail"
- [root@mail scripts]# ls /backup/mail
- 02Server-2011-06-30.12h.07m.07s 02Server-2011-06-30.12h.17m.56s
- 02Server-2011-06-30.12h.12m.41s
- [root@mail scripts]# ls /backup/mail -lh
- total 24K
- drwxr-xr-x 2 root root 4.0K Jun 30 12:07 02Server-2011-06-30.12h.07m.07s
- drwxr-xr-x 2 root root 4.0K Jun 30 12:12 02Server-2011-06-30.12h.12m.41s
- drwxr-xr-x 2 root root 4.0K Jun 30 12:17 02Server-2011-06-30.12h.17m.56s
- [root@mail scripts]# ls /backup/mail/02Server-2011-06-30.12h.07m.07s/
- [root@mail scripts]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement