Perl script to Archive the data file after the load

I have written a perl scripts which loads the data.
Now i want to modify the script, to Archive the Input file after the successful load of data.

Can anyone please share it and help me ....

Thanks.

hhuh?

Once you successfully load the file make tar of that file and move to your archive directory and if this is successful then remove original file(if required) as below.

tar -cvzf fileA.tar.gz fileA && mv fileA.tar.gz /your/archive_dir/ && rm fileA
1 Like