- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- Trasfer logs via sftp older than 15 days
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×
Sign in with your Check Point UserCenter/PartnerMap account to access more great content and get a chance to win some Apple AirPods! If you don't have an account, create one now for free!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trasfer logs via sftp older than 15 days
Greetings,
I'm trying to create a bash script that makes me a single .tar file of logs older than 15 days and sends them to me via sftp.
But I can't get the creation of the .tar file to work:
#!/bin/bash
find /var/log -type f -mtime +30 | xargs -0 tar -zcf file_compress.tar.gz;
export SSHPASS=XXXXXX
sshpass -e sftp -oBatchMode=no -b - XXXXXXX@XXXXXX << !
cd Incoming
put file_compress.tar.gz
bye
!
done
Any suggestion ?
0 Replies
