http://www.perlmonks.org?node_id=80062


in reply to Network backup thing

Looking at this code makes me think life would be good with URI::SMB. This particular script would loose the
my $samba_user = ""; my $samba_password = ""; my $samba_remote_host = ""; my $samba_share = ""; my $samba_current_host = ""; #Samba Remote share subdir #Empty means root share #Could be combined with $ENV{HOSTNAME}

part. I would then use Getopts::Long to change the interface to something like:

$0 --(daily|weekly|hourly|etc) --smb=smb://user:pass@host/share

If --smb was not set, it could check the env before dieing.

And it would be really helpful if Filesys::SmbClientParser accepted one of these.

Have you thought about use URI's for your db file? That way you can back up not just local files, but files on other smb hosts, webpages, ftp files or hunks of ldap. Well, anything that uri supports and has a client for.