Re: db backup script in gentoo

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: db backup script in gentoo
Дата
Msg-id dcc563d10811291620p640a49dbv13576fd70e0f278@mail.gmail.com
обсуждение исходный текст
Ответ на Re: db backup script in gentoo  ("Andrus" <kobruleht2@hot.ee>)
Ответы Re: db backup script in gentoo  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
On Sat, Nov 29, 2008 at 3:23 PM, Andrus <kobruleht2@hot.ee> wrote:
> 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:

Are you using ftp or lftp? lftp is much more scriptable / controllable
than regular ftp.

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

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