What is your favorite backup method?

David Beroff

Well-known member
Registered
Joined
Jun 14, 2016
Messages
1,498
Points
63
I have been looking for better ways to back up my websites' data but i am still confusing to choose a best backup method. What is your favorite backup method? Waiting for your shares!
 

ProResellerHost_Jack

Member
Registered
Joined
Sep 11, 2020
Messages
33
Points
6
Hello David,
Backing up your website and data is extremely important in case of a disaster. The general consensus is the following :

3 copies of your data
2 different storage mediums
1 offsite backup

For my personal websites I choose to utilize cpanel backup features, but also backup to my local server at home. That server then gets backed up to a cloud provider. So multiple copies.

Another option is something like using Jet Backup or similar and backing up to Backblaze B2 storage (great pricing and control), Crash plan, rsync.net, and others.

I would highly suggest having an automated backup to an offsite location. This means a location other than the server your site is being hosted on.

If you have any questions or would like me to expand on anything, feel free to let me know.
 

Efe Agbontaen

Member
Registered
Joined
Sep 4, 2020
Messages
49
Points
6
The files and the Database are the main things so your control panel backup system should be fine.

But since they will be stored on the same server, or the same company server, I will advice you manually move the backups somewhere else. Because even if they have stable servers with redundancy, an account suspension will affect you.

We are actually working on a service to do this automatically.
 

Questlot

Member
Registered
Joined
Oct 8, 2017
Messages
15
Points
3
I use CPanel backup for my website, its faster and more convenient. If you want to backup your database automatically and periodically to your system you can use SQL BackupFTP.
 

etechsupport

Well-known member
Registered
Joined
Jun 25, 2020
Messages
118
Points
16
Experts recommend the 3-2-1 rule for backup: three copies of your data, two local (on different devices) and one off-site. For most people, this means the original data on your computer, a backup on an external hard drive, and another on a cloud backup service.
 

fiz

Well-known member
Hosting Provider
Registered
Joined
Aug 6, 2020
Messages
116
Points
16
1. cPanel/WHM Backup: (Home directory and Database separately) You can take a Full backup but will contain everything in that cPanel account, Also select a remote destination in your backup configuration in WHM
2. Using SSH:
Code:
/scripts/pkgacct <cpanel-user> --skiphomedir
and then use rsync to sync the home directory to another server. You can write an SSH script and add it to cron to let this happen by itself every day/week or month. (Recommended because its fastest and use fewer resources) My Favorite.

Be advised, if you don't know how to use SSH, do not go for the second option. You might end up with nothing.
 

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
609
Points
28
Kaz Wolfe
You can take a Full backup but will contain everything in that cPanel account, Also select a remote destination in your backup configuration in WHM
I am concerning about this way. Can you share detailed configurations for this method?
 

fiz

Well-known member
Hosting Provider
Registered
Joined
Aug 6, 2020
Messages
116
Points
16
Best answer
fiz
Sure, Let me help you with this. I wrote a response that I intend to post somewhere else.

You can log in to WHM

Go to Backup > Backup Configuration
  1. Check Enable Backups
  2. Configure Backups by choosing the desired options
  3. Go to the Additional Destinations tab and click select your Destination from the dropdown and click Create New Destination
  4. Add the destination information and click Save Destination
  5. It will automatically copy the backups to the destination server.

But this is my favorite method and more efficient and uses less resources.

On the source server (that has the cPanel account), I've ssh script similar to this one.

Bash:
#!/bin/sh

exec 1>/backup-ssh-logfile 2>&1

echo "Server Backup Start - $(date)";

echo "Making Today's Backup Folder..";

mkdir /auto_backup_script_$(date +"%d-%m-%y");

echo "Starting Backup Home Folder without Home Directory...";

/scripts/pkgacct --skiphomedir cpanel_username /auto_backup_script_$(date +"%d-%m-%y");

echo "Deleting Backups from day before yesterday..";

rm -rf /auto_backup_script_$(date -d "-2 day" '+%d-%m-%y');

echo "Old Backups Deleted";

(echo "Subject:Backup Log: $(date +"%d-%m-%y") "; cat /backup-ssh-logfile) |  sendmail -i  [email protected];


Explanation:

Create a log file name backup-ssh-logfile and put the script response in it
echo date and info that you might need in future
make a backup directory with today's date
create a cPanel backup without the user's home directory
remove old backups
send an email to the desired address with the log file content.


And this script on Destination Server (Backup Server):



Bash:
#!/bin/sh

exec 1>/backup-ssh-logfile 2>&1

echo "Copying cPanel Accounts Backup without Home Directory - $(date +"%d-%m-%y")";

/usr/bin/rsync -avz -e "ssh -p 22" source.ibeehost.com:/auto_backup_script_$(date +"%d-%m-%y") /home/destination_folder/;

/usr/bin/rsync -avz -e "ssh -p 22" --exclude /path/to/exclude --exclude /path/to/exclude/ server.ibeehost.com:/home/source_username/ /home/destination_folder/cpanel_username;

(echo "Subject:Backups Sync Log: $(date +"%d-%m-%y") "; cat /backup-ssh-logfile) |  sendmail -i  [email protected];


Explanation:

Create a log file name backup-ssh-logfile and put the script response in it
echo date and info that you might need in future
Sync Automated generated backups on source server without home directory using rsync
Sync user's home directory using rsync (add as many users as you want)
send an email to the desired address with the log file content.
You can remove old backups automatically if you want.



Add both of these files in corn job using the following method or any alternative if you know.

1.
Bash:
nano /etc/crontab
2. Paste the following in the crontab file:
Bash:
5 3 * * *    root    ./backup.sh
(this means cron will run everyday at 3:05 AM)

3. Save the file and restart cron service using the command

Bash:
service crond restart
There is one more thing that you should do to make sure cron can run the sh script. Run the command to apply the correct permissions to backup.sh file
Bash:
chmod +x backup.sh

If you still need any help let me know. I've simplified as much as I could in short time.
 
Last edited:

fiz

Well-known member
Hosting Provider
Registered
Joined
Aug 6, 2020
Messages
116
Points
16
fiz
There is one more thing that you should do to make sure cron can run the sh script. Run the command to apply the correct permissions to backup.sh file
I've added one more step that I forgot initially to mention for corn to work correctly.
 

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
609
Points
28
Kaz Wolfe
Can I see crons in an user interface? or define it via an user interface, it is easier than create codes like this 5 3 * * * root ./backup.sh or after that managing it.
 

fiz

Well-known member
Hosting Provider
Registered
Joined
Aug 6, 2020
Messages
116
Points
16
fiz
I'm afraid you can't.
 

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
609
Points
28
Go to Backup > Backup Configuration
  1. Check Enable Backups
  2. Configure Backups by choosing the desired options
  3. Go to the Additional Destinations tab and click select your Destination from the dropdown and click Create New Destination
  4. Add the destination information and click Save Destination
  5. It will automatically copy the backups to the destination server.
For the first step, I created like you guide but it didn't work. I didn't see backup file on destination server after some days.

Create a log file name backup-ssh-logfile and put the script response in it
Create backup-ssh-logfile.log file?
 

fiz

Well-known member
Hosting Provider
Registered
Joined
Aug 6, 2020
Messages
116
Points
16
For the first step, I created like you guide but it didn't work. I didn't see backup file on destination server after some days.
I cannot really figure out the issue without seeing it. You might need to look into the log files.
Bash:
/usr/local/cpanel/logs/cpbackup
This directory contains the cPanel backup log files.

Bash:
/usr/local/cpanel/logs/cpbackup_transporter
This directory contains the cPanel Backup Transporter's log files.

Create backup-ssh-logfile.log file?
Its just a name if you want it to be a .log file then rename it to backup-ssh-logfile.log. I am creating it in /root/ directory that's why I wrote
Bash:
/backup-ssh-logfile
if you want it to be in different directory like /home/ then write
Bash:
/home/backup-ssh-logfile.log
 

Localnode

Well-known member
Registered
Joined
Dec 15, 2015
Messages
333
Points
43
For cPanel servers I use the in-built method to backup to an external source.
I also use ClusterLogics (formerly Bacula4) CDP to a different external source.
In addition to the above - there is also on-site backups done daily.
All of these methods have different retention times.
 

williammark

New member
Registered
Joined
Nov 12, 2020
Messages
1
Points
1
Data is the most important thing. I am using for the storage of data Dropbox, google drive and cpanel as well.
 

hostguy

Member
Registered
Joined
Sep 9, 2020
Messages
49
Points
6
The easiest methond to take backup is from cpanel.
cpanel provides GUI method which makes backup easy and simple.

We can simply take backup with below steps:
Login to cpanel >> Backup Wizard >> Here we can take backup.

For more details we can check how to take backup in cpanel in details.
 

RoseHosting

Well-known member
Hosting Provider
Registered
Joined
Jun 16, 2016
Messages
93
Points
8
The best backup is the backup made by the hosting company. It is a full server backup of your VPS/Dedicated Server. There is no chance to lose anything.
 

AlbaHost

Well-known member
Moderator
Hosting Provider
Joined
Jan 18, 2017
Messages
809
Points
43
AlbaHost
The best backup is made by yourself carefully + your hosting company aswell, so twice backups much better. Not long ago, a customer of Hivelocity a big dedicated server and hosting company, that he had paid for a managed service including the backups which he was paying triple expensive just for this he lost his whole business with hundered of sites in their server, because Hivelocity support team failed to configure right their servers and the backups were not made correctly. Hivelocity all what they did, was to offer a small compensation! If you lose everything in hundered of websites you don't need any server nor compensation anymore, therefore we are humans and make mistakes, that's why you need own twice/multiple backups.
 

Harry P

Well-known member
Registered
Joined
Feb 3, 2015
Messages
447
Points
28
Backup manually is my method, I don't like build in backup on web hosting control panels because it is a bit hard to control which data I will get backup.
 

xiamuguizhi

New member
Registered
Joined
Oct 2, 2021
Messages
9
Points
1
I use the plug-in service of the vps panel, which will automatically backup and upload to the network disk at the time I set, which is a good choice.

Last month, my vps service provider mistakenly deleted my server, which caused my website to shut down. Fortunately, I had a backup site to the network disk, but I still lost a month’s worth of photos.
 

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
I usually do backups manually although it consumed more time but it gives me what I want to backup.
 
Latest Threads
Replies
0
Views
122
Replies
1
Views
77
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top