Using PogoPlug V4 As Folder Monitor For External SAMBA Share

Ask questions about Arch Linux ARM. Please search before making a new topic.

Using PogoPlug V4 As Folder Monitor For External SAMBA Share

Postby brainflurry » Sat Jul 01, 2017 5:57 am

I have a PogoPlug V4 that I have converted into a box running Arch Linux and would like to use it to monitor and access other devices on the network.

I have a Drobo 5N with a SAMBA share that contains logs produced by a nightly backup "\\DROBO\backup\logs".
These backups are created with a naming convention that includes the date time YYYYMMDDHHMM and are appended with SUCCESS, ABORTED or FAILURE.

I would like to use the PogoPlug with Arch Linux to monitor the "\\DROBO\backup\logs" network share and check for any file that did not exist since the time of the last check.

If a new file exists, I'd like it to send an email notification using a gmail account (I'm working on getting SSMTP installed now) and include an email subject of "Backup successful" when a new file exists that contains "Success" otherwise the subject should contain "Backup failed" when a new file exists.

I believe I can figure out how to grep for the file name. But I don't have the slightest clue how to filter grep by the newest file in addition to determining whether the file is new since the last check.

I suspect that I will need to create a bash script and run it as a cron job, but I would appreciate any suggestions on how to approach the rest.

Thank you in advance for your contribution.
brainflurry
 
Posts: 1
Joined: Sat Jul 01, 2017 5:52 am

Return to User Questions

Who is online

Users browsing this forum: No registered users and 8 guests