How to back up whole Linux server?

TheCompWiz

Well-known member
Joined
Apr 20, 2016
Messages
108
Best answers
0
Ratings
4
Points
18
#1
Hi everyone, Can you tell me how to back up whole my Linux server? I mean I want to backup all files and databases on entire server and when I reinstall my server then I can restore that backup and I can use it immediately whiteout re-configure or installations?
 
Joined
Apr 25, 2018
Messages
18
Best answers
0
Ratings
6 3
Points
3
#2
You're referring to a bare metal restore. You'll want to look around for backup software that can do this for you. R1soft seems to be one of the more popular choices among sysadmins.

I know from my experience backup software tends to be frustrating. Things can happen and your backups may not be reliable. R1soft tends to be one that sucks the least and is somewhat affordable.
 

VirtuBox

Global Mod
Staff Member
Joined
May 3, 2016
Messages
1,454
Best answers
3
Ratings
347 7
Points
83
#4
Hi everyone, Can you tell me how to back up whole my Linux server? I mean I want to backup all files and databases on entire server and when I reinstall my server then I can restore that backup and I can use it immediately whiteout re-configure or installations?
Hello,
you can make a snapshot of your whole disk or partition with the command dd :
Bash:
# /dev/sda is the disk to backup 
dd if=/dev/sda ibs=4096 conv=noerror | gzip > backup.image.gz
Then you will be able to restore it with
Bash:
zcat backup.image.gz | dd of=/dev/sda ibs=4096
 

mobin

Well-known member
Joined
Jun 22, 2017
Messages
122
Best answers
0
Ratings
29 1
Points
28
#7
Please note that the snapshot option will work only against of your data partition if you want to reinstall the OS for any specific reason. Also a customized system like cPanel, Plesk, etc this is not a complete solution. But of course this is the quickest if the server is under your direct configuration. That said....reinstall OS and no re-configuration do not match. If you reinstall the OS, that means the package installation and all should do again - you can only backup configuration in that case. Otherwise it will be still your old OS.

So to answer your actual question - as said, it will be based on your server environment and what all data you want to restore.
 

Nixtree

Well-known member
Joined
Jul 16, 2016
Messages
92
Best answers
0
Ratings
31 4
Points
18
#8
I will always suggest to do backups only on account level rather than server level. Suppose you are initially in a Old Os say centos5 and your backups are taken like this, then if you wish to upgrade the Os or wish to change the Os , then it will not work. Also entire Os will take time to get restored.

For control panel based one I will suggest to get a copy of accounts in thier own platform like pkgaccount in case of cpanel, Plesk dumps in case of plesk etc which will help us to restore all its subitems and links as one domain will have 100s of references and we will not be able to manually handle all those references.

Your method will only work for those which you setup custom and not for cpanel/plesk/directadmin ones. If you can let us know the exact environment for which you need and also what scenarios you need to cover we can be more helpful to you.

Environment : Which Os and Which Control panel in use ?

1. you want single accounts to be restored ?
2. Speedy accounts restore of all accounts incase of Os reinstall
3. you want to have a single file to be restored ?
4. Single db to be restored ?
 

Nixtree

Well-known member
Joined
Jul 16, 2016
Messages
92
Best answers
0
Ratings
31 4
Points
18
#13
I have been using Dirvish for a customer for the last 6 years and I can see those are really good and handy. We add mysql backup dump script and cpanel pkgacount script skipping homedir and the backup we take is incremental one using dirvish.

So such a setup we can restore
one file,
one db,
one cpanel account using restore of the pkg account first and then restore the corresponding /home/user folder.
and if the entire server is gone, we can restore the account initially using cpanel pkg account backups and then we can rysnc the files and db using the backups with dirvish backup server

http://dirvish.org/

i like this very much and is very handy so far as an admin I really like to work from command line which give me more flexibility rather than going with r1soft front end interface.
 
Joined
Apr 24, 2018
Messages
6
Best answers
2
Ratings
6
Points
3
#18
You can backup your whole Linux server using a simple command
Open your terminal and run this command :cool:
Code:
$ sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt
 
Newer Threads
Replies
0
Views
27
Replies
6
Views
78
Replies
4
Views
77
Replies
2
Views
35
Latest Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Web Hosting

Most Likes - Past 30 Days

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.