DBI and the Network
am 10.05.2006 22:50:45 von GalbreathM
--=__Part290C0235.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Not directly on topic, but close....
=20
I am automating the import of Oracle DBM datafiles into MySQL tables via =
DBI, DBD::XBase, and DBD::mysql. The files are on a Novell shared =
directory on a Windows server and my app will run on a linux kernel 2.6 =
box. I have smbmount 3.0.10-1 installed. Are there any perl modules/utili=
ties I can scrounge to transfer those DBF files programmatically (cron) to =
my linux workstation?
=20
tia,
mark
--=__Part290C0235.0__=--
Re: DBI and the Network
am 11.05.2006 07:21:08 von Alexander
How about a simple shell script?
#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
cp /mnt/blabla/path/on/the/share/* /some/where
umount /mnt/blabla
# and if you want to work with the files:
perl yourscript.pl -some -arguments /some/where
(Of course, you could also implement the calls to mount and umount in
Perl, and copy the files using File::Find and File::Copy.)
You could also work with the files directly from the server:
#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
perl yourscript.pl -some -arguments /mnt/blabla/path/on/the/share
# - or -
# cd /mnt/blabla/path/on/the/share
# perl yourscript.pl -some -arguments .
# cd /
umount /mnt/blabla
To allow mounting and unmounting without root privileges, you should
create a matching entry in /etc/fstab (man 5 fstab), using the "user"
parameter. Something like
//server/share /mnt/blabla smbfs noauto,user,rw 0 0
In that case, only /mnt/blabla is required as argument for mount.
Alexander
On 10.05.2006 22:50, Mark Galbreath wrote:
>Not directly on topic, but close....
>
>I am automating the import of Oracle DBM datafiles into MySQL tables via DBI, DBD::XBase, and DBD::mysql. The files are on a Novell shared directory on a Windows server and my app will run on a linux kernel 2.6 box. I have smbmount 3.0.10-1 installed. Are there any perl modules/utilities I can scrounge to transfer those DBF files programmatically (cron) to my linux workstation?
>
>tia,
>mark
>
>
>
>
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
Re: DBI and the Network
am 11.05.2006 14:57:45 von GalbreathM
--=__PartA28788D9.1__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Thanks a lot, Alexander! I was considering shell scripting, but never =
having any experience with smbfs, I am not sure how to approach the =
problem. I appreciate your suggestion and will test them.
=20
~mark
>>> Alexander Foken 11-May-06 01:21:08 AM >>>
How about a simple shell script?
#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
cp /mnt/blabla/path/on/the/share/* /some/where
umount /mnt/blabla
# and if you want to work with the files:
perl yourscript.pl -some -arguments /some/where
(Of course, you could also implement the calls to mount and umount in=20
Perl, and copy the files using File::Find and File::Copy.)
You could also work with the files directly from the server:
#!/bin/sh
mount -t smbfs //server/share /mnt/blabla
perl yourscript.pl -some -arguments /mnt/blabla/path/on/the/share
# - or -
# cd /mnt/blabla/path/on/the/share
# perl yourscript.pl -some -arguments .
# cd /
umount /mnt/blabla
To allow mounting and unmounting without root privileges, you should=20
create a matching entry in /etc/fstab (man 5 fstab), using the "user"=20
parameter. Something like
//server/share /mnt/blabla smbfs noauto,user,rw 0 0
In that case, only /mnt/blabla is required as argument for mount.
Alexander
On 10.05.2006 22:50, Mark Galbreath wrote:
>Not directly on topic, but close....
>=20
>I am automating the import of Oracle DBM datafiles into MySQL tables via =
DBI, DBD::XBase, and DBD::mysql. The files are on a Novell shared =
directory on a Windows server and my app will run on a linux kernel 2.6 =
box. I have smbmount 3.0.10-1 installed. Are there any perl modules/utili=
ties I can scrounge to transfer those DBF files programmatically (cron) to =
my linux workstation?
>=20
>tia,
>mark
>
>
> =20
>
--=20
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
--=__PartA28788D9.1__=--