Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

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.

Cpanel Full Backup File - Extract Date-time and user

plumbergplumberg Veteran, Megathread Squad

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

  • debugdebug Member
    edited May 2016

    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 -__-)

  • plumbergplumberg Veteran, Megathread Squad

    @debug said:
    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.

Sign In or Register to comment.