su - oracle -c "exp system/parola file=/yedek/hostname_`date +%
d`_export.dat FULL=Y"
gzip /yedek/hostname_`date +%d`_export.dat
/usr/local/bin/scp /yedek/hostname_`date +%d`_export.dat.gz
yedek_at_remote_makina:gunluk_exportlar
Karsi makineye ssh ve scp kullanimi icin basit bir script:
#!/usr/bin/bash
KULLANICI=root
HOST=remote makinenin ip'si
DIRECTORY="/"
export KULLANICI HOST DIRECTORY
ssh-keygen -t dsa
cat id_dsa |ssh "$KULLANICI"@"$HOST" 'cat >'$DIRECTORY'/.ssh/id_dsa'
cat id_dsa.pub |ssh "$KULLANICI"@"$HOST" 'cat
>'$DIRECTORY'/.ssh/id_dsa.pub'
ssh "$KULLANICI"@"$HOST" 'cat '$DIRECTORY'/.ssh/id_dsa.pub
>>'$DIRECTORY'/.ssh/
authorized_keys'
ssh "$KULLANICI"@"$HOST" 'chmod 600 '$DIRECTORY'/.ssh/*'
Orhan Berent
On Tue, 2008-02-05 at 10:21 +0200, Atilla wrote:
> Yanlis basliga yazmisim afedersiniz ,,
> "connect sys/username password (sys)@xe as
> sysdba;
> imp file=DUMP_PATH fromuser=****** touser=***** buffer=212000"
>
> Bu sekilde bir bash script ile oracle a baglanip dump almak ve alinan
> dump i baska bir remote ip e transfer etmek istedim .
> Ama sonuc alamiyorum . kullandigim baglanti formatinda mi acaba
> sorun?
> Yardimci olursaniz sevinirim.
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama_at_liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Thu 07 Feb 2008 - 15:22:58 EET