in reply to tar help
First step: code tags:
Second step: try it with one file:#!/usr/bin/perl use Archive::Tar; my $tar = Archive::Tar->new; $tar->add_files('/var/lib/mysql/club -R'); $tar->write('club_db.tar'); use Net::FTP; print "putting the file on the server\n"; $ftpobj = Net::FTP -> new ("192.168.1.21"); $ftpobj -> login("my_name","my_pass"); $ftpobj -> binary; $ftpobj -> put ("club_db.tar"); $ftpobj -> quit;
third step, try it with two files:#!/usr/bin/perl use Archive::Tar; use Net::FTP; my $tar = Archive::Tar->new; $tar->add_files('/var/lib/mysql/club/foo'); $tar->write('club_db.tar'); print "putting the file on the server\n"; $ftpobj = Net::FTP->new ("192.168.1.21"); $ftpobj->login("my_name","my_pass"); $ftpobj->binary; $ftpobj->put ("club_db.tar"); $ftpobj->quit;
fourth step ...my $tar = Archive::Tar->new; $tar->add_files( '/var/lib/mysql/club/foo', '/var/lib/mysql/club/bar'); $tar->write('club_db.tar');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: tar help
by snyder (Initiate) on Mar 21, 2006 at 21:48 UTC | |
by derby (Abbot) on Mar 22, 2006 at 12:35 UTC | |
by snyder (Initiate) on Mar 23, 2006 at 17:56 UTC |