Downloading full server backup with browser

maxoniva

Registered
Mar 12, 2018
1
0
1
Turkiye
cPanel Access Level
Root Administrator
Hello. I just start using WHM and I'm very new in this theme. The sysadmin before me create monthly backup procedure with WHM > Backup > Backup Configuration. It makes full server backup to /backup folder. The sysadmin every month created gziped file of this backup and sent some link to my manager so manager could download this gzipped file. I wonder, how it's possible. Hope anybody can help me with this.
P.S. "Ask this sysadmin" is not an option.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello,

You'd need to use a utility such as SFTP or Rsync to download the archives to your local computer if you want to avoid accessing cPanel for each account to download them individually. You could use an application such as FileZilla to access the server via SFTP as "root" and download the archives from the server's /backup/ directory.

Thank you.
 

RadWebHosting

Well-Known Member
May 6, 2016
56
12
8
Dallas, Texas
cPanel Access Level
DataCenter Provider
Twitter
Would it not be possible to compress the /backups/date-of-backup directory, which includes account and system backup directories, into a downloadable file (i.e. .gz)-and move this backup into a public directory (accessible over browser from 443 or 80, for instance)?

It seems like some basic hooks management would make this easy to automate? Thoughts?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @RadWebHosting,

The argument against moving all backups to a publicly accessible directory (even temporarily) is that it exposes account-specific data to anyone that's able to enter the URL in their web browser. While you could potentially reduce the risk of data exposure by using an obscure directory name or enabling password protection, it's not really a good security practice.

That said, you are correct that it's possible to setup a post backup hook to automatically perform an action such as moving the backup archives to a different directory upon the completion of each backup generation. Here are a couple of documentation links to help you get started if that's something you'd like to setup:

Guide to Standardized Hooks - Developer Documentation - cPanel Documentation
Guide to Standardized Hooks - System Functions - Developer Documentation - cPanel Documentation

The first document is the overall guide to standardized hooks and the second one includes information about the Backup hook. Let me know if you have any questions.

Thanks!
 

RadWebHosting

Well-Known Member
May 6, 2016
56
12
8
Dallas, Texas
cPanel Access Level
DataCenter Provider
Twitter
Completely agree-this isn't appropriate for the typical cPanel usage (hosting live websites, mails, dns, etc).

Having said that, for the sake of "solving" the original question posted, the question wasn't specific about the circumstances and configuration/usage of the server.
 
  • Like
Reactions: cPanelMichael

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,
The sysadmin every month created gziped file of this backup and sent some link to my manager so manager could download this gzipped file. I wonder, how it's possible. Hope anybody can help me with this.
This can certainly be done. All you have to do is deploy a script that will turn your backups into downloadable link and mail you with the links for you to download. This is a bit technical though, so if you are not sound in system administration skills, you may require assistance of system admin for this.