ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Алексей Шенцев" <ashen@nsrz.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: [Comm] Выгрузка 1Сv81 в linux по расписанию & сесси xorg'а
Date: Fri, 6 Feb 2009 13:04:55 +0300
Message-ID: <200902061304.56178.ashen@nsrz.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]

Всем привет!
Насколько мне известно резервное копирование БД 1С под linux'ом делают с 
помощью дампа БД pg,с последующим сжатием дампа. Но не всегда это удобно. 
Например мне удобно иметь именно выгрузку в dt-файлах 1С. А это возможно 
сделать средствами самой 1С. Получил вот нижеследующее решение.
Создаём каталог для выгрузок 1С (к примеру у пользователя, в данном случае 
ashen, т.е. я):
~/wine_c/1CBakcup
Создаём скрипт 1CBackup.sh, см. вложение.
Создаём crontab файл пользователя (хоть с помощью kcron):

cat /var/spool/cron/ashen
# Выставляем свои переменные окружения.
SHELL=/bin/bash
HOME=/home/ashen
MAILTO=ashen
PATH=/bin:/usr/bin:$HOME/bin

# Делаем бекап из 1С
0 2 * * *       /home/ashen/wine_c/work/1CBackup.sh

# EOF

И всё работает. Данное решение универсально, т.к. dt-файл для 1Сv81 мы можем 
делать хоть с сервера 1С под управление ОС от m$, а СУБД для 1С может быть 
хоть от m$, хоть от IBM, хоть pg.

Но есть один момент, пользователь от которого будет происходить выгрузка 
должен войти, в моём случае, в KDE. Иначе получаем такую ругань:

/usr/bin/wine: Running without console, disable input
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Error opening terminal: unknown.

Вопрос следующий: как можно выполнить приложение wine, явно не входя в wm?
Дело в том, что сервер 1С создаёт системного пользователя usr1cv81 и выполнять 
выгрузку по расписанию логичней от его имени.
-- 
С уважением Шенцев Алексей Владимирович.
E-mail: ashen@nsrz.ru
XMPP: ashen@altlinux.org, AlexShen@jabber.ru
ICQ: 271053845

[-- Attachment #2: 1CBackup.sh --]
[-- Type: application/x-shellscript, Size: 609 bytes --]

             reply	other threads:[~2009-02-06 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 10:04 Алексей Шенцев [this message]
2009-02-06 17:25 ` Denis Nazarov
2009-02-09  6:14   ` Алексей Шенцев
2009-02-06 17:33 ` Ivan Fedorov
2009-02-09  6:14   ` Алексей Шенцев
2009-02-09  8:39     ` Alexander Yereschenko
2009-02-09  8:46       ` Алексей Шенцев

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902061304.56178.ashen@nsrz.ru \
    --to=ashen@nsrz.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git