New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Cpanel Full Backup File - Extract Date-time and user
Is there a quick and easy way to extract the backup date-time and user/ account information from a cpanel full backup file?
eg: backup-5.17.2016_05-15-12_USERACCOUNT.tar.gz
I need to get three variables:
Date: 5.17.2016
Time: 05-15-12
User: USERACCOUNT
I have several backup files which I need to extract it from (on centos 7).
Any help appreciated
Comments
Assuming you're grabbing it from the filename, it should be some pretty simple text parsing. This took me ~1 minute, and it gave me all the information you need. It's up to you to use the variables (date, time, user) appropriately
Code: http://pastebin.com/EiRTXBX9
(I would post it here, however CloudFlare constantly insists I answer a non-rendered CAPTCHA -__-)
This is superb. Thanks a bunch.