Can account backups seperate mail folder from other account information

Operating System & Version
CentOS 7.9
cPanel & WHM Version
WHM 92.0.6

martin MHC

Well-Known Member
Sep 14, 2016
212
34
28
UK
cPanel Access Level
Root Administrator
We have regular account backups that are generated every day. These backups contain all the account information for each account and are stored as .tar.gz files.

Recently we needed to explore the SQL data in some backups and found issues that the backup file size was so big it was causing a big slowdown in processing this request (from the client).

The account.tar.gz was 24Gb - This was stored remotely and so we needed to download 24Gb in order to open the file and then to extract the account.sql which was 100kb.

Almost all of the backups size is emails. Is there any way, or any how-to guide as to creating a backup system that stores account details seperately from mail details such as:

account.tar.gz = All account files and folders EXCEPT mail (and any related mail data)
account-mail.tar.gz = the account /mail/ folder (and any related mail data)

This would help enormously in only needing to download much smaller data amounts and opening much smaller files when we simply don't need to explore clients vast emails

Cheers
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,283
536
273
cPanel Access Level
Root Administrator
Hey there! We wouldn't have an automated tool that would let you split the backup types, but it is possible to pull out files from a tar file without extracting the entire tarball:


If you have a tool like JetBackup you could use that to exclude certain directories, allowing that backup tool to make a partial backup of the account for you:

 

martin MHC

Well-Known Member
Sep 14, 2016
212
34
28
UK
cPanel Access Level
Root Administrator
If you have a tool like JetBackup you could use that to exclude certain directories, allowing that backup tool to make a partial backup of the account for you:

This could work but would need to tell the WHM backup system to make two backups -- one of the full account excluding /mail/ and one of the /mail/ folder in isolation. Would this be possible (I am also unfamiliar with JetBackup biut it states it requires WHMCS which I'm unclear if that is the same thing as WHM or if it's another 3rd party software requirement? )
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,283
536
273
cPanel Access Level
Root Administrator
WHMCS isn't required for the JetBackup tool to be installed for function. Can you let me know where you found that? Here is the page with the system requirements:


I was thinking one backup with cPanel tools and one with JetBackup and that would get you both versions you need.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
588
186
343
cPanel Access Level
DataCenter Provider
Just wondering what kind of access you have to the remote server? When we need to do this we normally do something like the following

Code:
tar -tzvf account.tar.gz | egrep sql
That will then list out the full path to all the .sql dumps. You can then run

Code:
tar -xzvf account.tar.gz /full/path/to/database.sql
And it will extract only the database dump that you want. Assuming you can do this all on the remote server, you'll save your self a lot of time/effort/bandwidth.
 

martin MHC

Well-Known Member
Sep 14, 2016
212
34
28
UK
cPanel Access Level
Root Administrator
Just wondering what kind of access you have to the remote server? When we need to do this we normally do something like the following
I would normally do this but have no command line access to remote files in any way, and the remote system won't open the files because they're too big so they need to be downloaded.
 

martin MHC

Well-Known Member
Sep 14, 2016
212
34
28
UK
cPanel Access Level
Root Administrator
WHMCS isn't required for the JetBackup tool to be installed for function. Can you let me know where you found that? Here is the page with the system requirements:


I was thinking one backup with cPanel tools and one with JetBackup and that would get you both versions you need.
Sorry, My mistake, I was looking at the JetBackup WHMCS page . Good idea to do a single JetBackup one simply omitting the /mail/ folder.
 
  • Like
Reactions: cPRex

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
588
186
343
cPanel Access Level
DataCenter Provider
You can actually do this pretty straight forward in JetBackup. When you do an 'accounts' type backup you get to choose what's being backed up. In one backup job you could only include email and in another you could have everything but email. This page in their doc has a screen shot of all the items you can include/skip in a full account backup: Create New Backup Job — JetBackup Documentation documentation