Re: db backup script in gentoo

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: db backup script in gentoo
Дата
Msg-id ggsfh7$1846$1@news.hub.org
обсуждение исходный текст
Ответ на Re: db backup script in gentoo  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Ответы Re: db backup script in gentoo  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
Uwe,

thank you very much. I created script and ran it from command line:

#!/bin/sh
PGUSER=postgres
PGPASSWORD=password
export PGUSER PGPASSWORD
backupdir=/root/my-backups
backupdate=$(date +%u)
backupfile=${backupdir}/mybackup${backupdate}.backup
pg_dump -Fc -b -Z6 mydb >${backupfile}
/usr/bin/ftp -inp <<EOF
debug 10
hash off
tick on
open myftpsite.com
user   myuser mypass
pwd
bin
verbose
remotestatus
lcd /root/my-backups
put "${backupfile}"
stat
bye

PGUSER=""
PGPASSWORD=""
export PGUSER PGPASSWORD

file /root/my-backups/mybackup6.backup  is created:

ls -l /root/my-backups/mybackup6.backup
-rw-r--r-- 1 root root 3155454 30. nov   00:06
/root/my-backups/mybackup6.backup

 ftp upload failed:

Output from script:

Debugging on (debug=10).
Hash mark printing on (1024 bytes/hash mark).
Hash mark printing off.
Tick counter printing on (10240 bytes/tick increment).
---> SYST
---> USER myuser
---> PASS XXXX
?Invalid command
?Invalid command
---> PWD
257 "/" is your current location
---> TYPE I
Verbose mode on.
?Invalid command
Local directory now /root/my-backups
local: /root/my-backups/mybackup6.backup remote:
/root/my-backups/mybackup6.backup
---> PASV
227 Entering Passive Mode (195,222,29,12,236,175)
---> STOR /root/my-backups/mybackup6.backup
553-Can't open that file: No such file or directory
553 Rename/move failure: No such file or directory
Connected tomyftpsite.com.
No proxy connection.
Mode: stream; Type: binary; Form: non-print; Structure: file
Verbose: on; Bell: off; Prompting: off; Globbing: on
Store unique: off; Receive unique: off
Case: off; CR stripping: on
Ntrans: off
Nmap: off
Hash mark printing: off; Use of PORT cmds: on
Tick counter printing: on
---> QUIT
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.


Why created fiel is not found ?
How to fix ?

Andrus.


В списке pgsql-general по дате отправления:

Предыдущее
От: ries van Twisk
Дата:
Сообщение: Re: Install question on Mac Leopard Server 10.5
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: db backup script in gentoo