LINUX.ORG.RU

Сообщения OlZhi

 

Ошибка tar.

Форум — General

У меня есть 4 папки как мне вписать их в bash

01. Отдел продаж 02. Бухгалтерия 03. Договор 04. Счета

#!/bin/bash

BACKUP_DIR="/mnt/backup-office"

FILES_DIR="/home/user/office/"
FILES_NAMEOP="/home/user/office/01."
FILES_NAMEBUH="/home/user/office/02."
FILES_NAMEDOG="/home/user/office/03."
FILES_NAMESH="/home/user/office/04."

TIMESTAMP=`date +"%Y-%m-%d_%H-%M"`

BACKUP_NAME=00.all-$TIMESTAMP.tar.gz
BACKUP_NAMEOP=01.sales_department-$TIMESTAMP.tar.gz
BACKUP_NAMEBUH=02.accounting-$TIMESTAMP.tar.gz
BACKUP_NAMEDOG=03.contract-$TIMESTAMP.tar.gz
BACKUP_NAMESH=04.accounts-$TIMESTAMP.tar.gz

mount $BACKUP_DIR

mkdir $BACKUP_DIR/$TIMESTAMP

tar czvf $BACKUP_DIR/$TIMESTAMP/$BACKUP_NAME $FILES_DIR
tar czvf $BACKUP_DIR/$TIMESTAMP/$BACKUP_NAMEOP $FILES_NAMEOP
tar czvf $BACKUP_DIR/$TIMESTAMP/$BACKUP_NAMEBUH $FILES_NAMEBUH
tar czvf $BACKUP_DIR/$TIMESTAMP/$BACKUP_NAMEDOG $FILES_NAMEDOG
tar czvf $BACKUP_DIR/$TIMESTAMP/$BACKUP_NAMESH $FILES_NAMESH

umount $BACKUP_DIR

exit 0;
root@websrv01:~# ./backup-office.sh
tar: Removing leading `/' from member names
/home/user/office/
/home/user/office/03. \320\224\320\276\320\263\320\276\320\262\320\276\321\200/
/home/user/office/01. \320\236\321\202\320\264\320\265\320\273 \320\277\321\200\320\276\320\264\320\260\320\266/
/home/user/office/02. \320\221\321\203\321\205\320\263\320\260\320\273\321\202\320\265\321\200\320\270\321\217/
/home/user/office/04. \320\241\321\207\320\265\321\202\320\260/
tar: Removing leading `/' from member names
tar: /home/user/office/01.': Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /home/user/office/02.: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /home/user/office/03.: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
tar: /home/user/office/04.: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

 

OlZhi
()

Samba. Не отображается в сети?

Форум — General
[global]
security = user
passdb backend = tdbsam
workgroup = WORKGROUP
lanman auth = no
ntlm auth = yes
client lanman auth = no

[web-data]

path = /var/www
browseable = yes
writable = yes
write list = student01
guest ok = no
valid users = student01
force user = root
force group = root

[office]

path = /var/office
public = yes
browseable = yes
writable = yes
write list =
guest ok = yes
valid users =
force user =
force group =

Файл не отображается в сети в отличии от web-portal. Она становится видимой после того как я вручную введу \\websrv01\office

 ,

OlZhi
()

RSS подписка на новые темы