VH
asked on
linux pull logs and export FTP
I am looking for a bash script to select logs from a directory, between two dates, then off load them to a TFTP server.
I don't want a file created with the logs on the system, just a temporary copy and then exported.
I don't want a file created with the logs on the system, just a temporary copy and then exported.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello. Depending on what logs exactly you want to 'backup', Linux has some built in commands that may help you.
It has been a while since I did some 'heavy lifting' with Linux but I remember something about the logrotate command.
Check out the man pages on it 'man logrotate' from the terminal and maybe you will see some options there.
There may be another built in Linux feature, but I am going to have to try and remember what it was.
It has been a while since I did some 'heavy lifting' with Linux but I remember something about the logrotate command.
Check out the man pages on it 'man logrotate' from the terminal and maybe you will see some options there.
There may be another built in Linux feature, but I am going to have to try and remember what it was.
ASKER
Thanks worked !
Maybe scp is a better replacement.
touch -t yyyymmddhhmm.ss /tmp/starting_time
touch -t yyyymmddhhmm.ss /tmp/ending_time
find /whateve/directory -newer starting_time -older /tmp/ending_time -exec scp '{}' user@remote:/whatever/plac
rm -f /tmp/starting_time /tmp/ending_time