Howdy, Stranger!

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


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop

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.