Overclock.net › Forums › Specialty Builds › Servers › Ideal backup method for CentOS VPS
New Posts  All Forums:Forum Nav:

Ideal backup method for CentOS VPS

post #1 of 7
Thread Starter 
Hello everyone.

I recently ventured out and bought my first Linux based VPS, running CentOS 6.4. Got it configured running 3 WordPress sites using NginX (which I like better than Apache already), and things are great. I have my WP sites backed up using a WP Plugin, so I can restore to a new WP site at will, but if something happens I would have to rebuild my VPS and reconfigure NginX, MySQL, PHP, PHP-FPM, Webmin, a phpBB forum, a Zurmo instance, etc. Painful to rebuild, and would require downtime.

So what is a good utility that would allow me to backup my full VPS (full system backup?) and transfer it via FTP or SFTP (I understand SFTP is more secure, but I get better FTP performance with this VPS -- performance is more important than encrypted transfer of my backup). Would it be a simple restore to a new CentOS 6.4 build, if I had to? Management with Webmin is definitely a plus (or even some other web based user interface).

Thanks!
post #2 of 7
@tycoonbob

You sound like you're looking for what effectively would be a baremetal backup. Just of the top of my head, have a look at using cpio. You'll have to tell it to exclude certain directories such as /proc. smile.gif I had an email with pretty detailed instructions from 10 years ago, but I can't find it. frown.gif
Edited by parityboy - 7/16/13 at 4:41am
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Western Digital Scorpio Black Samsung HD204UI Linux Mint 17 HP L1800 
KeyboardPowerCaseMouse
Logitech Basic Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Western Digital Scorpio Black Samsung HD204UI Linux Mint 17 HP L1800 
KeyboardPowerCaseMouse
Logitech Basic Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #3 of 7
Thread Starter 
Quote:
Originally Posted by parityboy View Post

@tycoonbob

You sound like you're looking for what effectively would be a baremetal backup. Just of the top of my head, have a look at using cpio. You'll have to tell it to exclude certain directories such as /proc. smile.gif I had an email with pretty detailed instructions from 10 years ago, but I can't find it. frown.gif

Thanks, I will look into cpio. I guess technically it is a baremetal backup, but what I have been looking into is Bacula. They have a community drive version (Open Source) that I am going to check out, but I'm having some problems with my VPS I have to fix first. I was trying to install PHP-XML, but it requires an older version of PHP-Common which is already instead. Only thing I could think of was to remove PHP-Common and all it's components (PHP-FPM, PHP-MySQL, etc) and install PHP-XML so it would install the version of PHP-Common it wants. I reconfigured my php.ini config and php-fpm.conf, so my main site works but now my Server Blocks aren't working (Server Blocks in NginX are equivilant to vHosts in Apache).

I'll get it fixed, and then check out Bacula and cpio both.

Thanks!
post #4 of 7
Quote:
Originally Posted by parityboy View Post

@tycoonbob

You sound like you're looking for what effectively would be a baremetal backup. Just of the top of my head, have a look at using cpio. You'll have to tell it to exclude certain directories such as /proc. smile.gif I had an email with pretty detailed instructions from 10 years ago, but I can't find it. frown.gif

Unrelated note....that CPIO link points to "startpage.com". Not sure if that's what you meant. CPIO is one of several dozen things I've been meaning to learn about as well.
Quote:
Originally Posted by tycoonbob 
Thanks, I will look into cpio. I guess technically it is a baremetal backup, but what I have been looking into is Bacula. They have a community drive version (Open Source) that I am going to check out, but I'm having some problems with my VPS I have to fix first. I was trying to install PHP-XML, but it requires an older version of PHP-Common which is already instead. Only thing I could think of was to remove PHP-Common and all it's components (PHP-FPM, PHP-MySQL, etc) and install PHP-XML so it would install the version of PHP-Common it wants. I reconfigured my php.ini config and php-fpm.conf, so my main site works but now my Server Blocks aren't working (Server Blocks in NginX are equivilant to vHosts in Apache).

I'll get it fixed, and then check out Bacula and cpio both.

Thanks!

Not sure how much I'll help since I'm still doing more linux asking than linux answering but it sounds kind of like you want to backup your VPS so far as re-creating the same configuration of the OS, web server etc. with the same config files etc.

I setup the CLI virtualbox on a linux server and got it just the I want and working and was looking into re-producing this setup a lot: It may in fact be advantageous to cobble together a shell script for each piece. Perhaps a gzipped archive with all the config files involved that the script extracts to the appropriate places (re-naming originals as it goes in case fall backs are required).

For instance one of the first things it would do if I were going to write such a shell script is a yum on php-xml to grab the appropriate versions of all those dependency versions as it wants. And adding the repositories and installing webmin. I happen to know entirely too well how to automate that part rolleyes.gif

I actually have more experience with aptitude than yum but I believe you can save off the RPMs you get via yum for later "offline" installation (like aptitude and deb packages). (And by offline I just mean not re-downloading them for the repos). e.g. tar/zip the RPMs of the packages once everything is installed and working and back that up to another location (like your home PC via FTP). Then when you need to re-build it grab that tar ball, extract and install them all (I think there's a CLI option for that, or a for-loop would work).

This is the sort of thing I would spend hours a day on for more than a month with my local servers until I got it right via trial and error. I think you have a much better lab setup than I do though you can will have more effective way of getting this working.

So a semi-accurate psuedo-code of this imaginary shell script might look like

update to scan repos (yums version of apt-get update)
update current system packages (yum's version of apt-get upgrade)
add necessary repositories/keys to yum for webmin etc.
update to scan repos (yums version of apt-get update) -- second time
use yum to install webmin, your web server, etc.
use mv command rename any and all config files that will be replaced so you have fall backs
extract tarball of your preferred config files (to ~/config_files or whatever, doesn't matter)
copy each config file to the appropriate location

Assuming I'm not forgetting a step you could then reboot and test as appropriate. Assuming it was all working, tarzip the directory with the RPMs in it so a new slightly modified version of this could be used to install from the local disk instead of over the netework. Of course a VPS will have it's own bandwidth and yum should always get the latest version so this part may be optional now that I think about it.

I don't know if this helped or not but it's way I would do it...
 
VM Server
(17 items)
 
 
CPUGraphicsRAMHard Drive
Intel Ivy Bridge Core i7-3630QM nVidia GeForce GTX 680M 16GB DDR3 1600MHz Dual Channel Memory (2 SODIMMS) Hard Drive: Serial-ATA II 3GB/s 
Hard DriveOSMonitorPower
Hard Drive: Serial-ATA II 3GB/s Windows 10 Pro x64 17.3" FHD 16:9 (1920x1080) Battery: Smart Li-ion Battery (8-Cell) 
Audio
Sound Blaster Compatible 3D Audio 
CPUMotherboardGraphicsRAM
Intel Core i7 860 Biostar T5 XE Radeon HD 5870 Corsair 16GB  
Hard DriveHard DriveOptical DriveOS
Western Digital hard drive wd1001fals-00e8b0 Maxtor 300GB I don't need no stinking optical drive Microsoft Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
HP ZR24w 24'' Samsung SyncMaster 24" logitech wireless k360 Seventeam ST-850ZAF 850W ATX 
CaseMouseAudioAudio
Thermaltake V9 Black Edition Logitech G500 Programmable Gaming Mouse FiiO E7 USB DAC and Portable Headphone Amplifier Sennheiser HD555 Professional Headphones 
  hide details  
Reply
 
VM Server
(17 items)
 
 
CPUGraphicsRAMHard Drive
Intel Ivy Bridge Core i7-3630QM nVidia GeForce GTX 680M 16GB DDR3 1600MHz Dual Channel Memory (2 SODIMMS) Hard Drive: Serial-ATA II 3GB/s 
Hard DriveOSMonitorPower
Hard Drive: Serial-ATA II 3GB/s Windows 10 Pro x64 17.3" FHD 16:9 (1920x1080) Battery: Smart Li-ion Battery (8-Cell) 
Audio
Sound Blaster Compatible 3D Audio 
CPUMotherboardGraphicsRAM
Intel Core i7 860 Biostar T5 XE Radeon HD 5870 Corsair 16GB  
Hard DriveHard DriveOptical DriveOS
Western Digital hard drive wd1001fals-00e8b0 Maxtor 300GB I don't need no stinking optical drive Microsoft Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
HP ZR24w 24'' Samsung SyncMaster 24" logitech wireless k360 Seventeam ST-850ZAF 850W ATX 
CaseMouseAudioAudio
Thermaltake V9 Black Edition Logitech G500 Programmable Gaming Mouse FiiO E7 USB DAC and Portable Headphone Amplifier Sennheiser HD555 Professional Headphones 
  hide details  
Reply
post #5 of 7
@subassy, @tycoonbob

Sorry about that, didn't realise Startpage hides the search URL from the address bar. Updated to use Google. smile.gif
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Western Digital Scorpio Black Samsung HD204UI Linux Mint 17 HP L1800 
KeyboardPowerCaseMouse
Logitech Basic Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
Mythica
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i3 530 Gigabyte GA-H55M-D2H Palit nVidia GT430 Corsair Dominator 4GB TW3X4G1333C9A 
Hard DriveHard DriveOSMonitor
Western Digital Scorpio Black Samsung HD204UI Linux Mint 17 HP L1800 
KeyboardPowerCaseMouse
Logitech Basic Thermaltake ToughPower 850W Lian-Li PC-A04B Logitech Trackman Wheel 
  hide details  
Reply
post #6 of 7
I'll just say bacula sucks. Ran it on my centos home server with a LTO2 tape drive and the data management is ok (besides the fact they store everything as blobs in a mysql database, so no compression when backed up), but creating and managing backup schedules, nodes and include/exclude statements is all conf file based. NO ability to edit anything with gui, or with out restart to the whole server process. Maybe I'm just spoiled since I work on backups at work, and enterprise level stuff is way more robust, and less annoying.
Teh Gam3r
(18 items)
 
Home server
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 4770 Gigabyte GA-Z87X-D3H Z87 RT Gigabyte GTX 1070 G1 G Skill Cheapo DDR3 1600 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Solid 3 Seagate Crucial SSD LG Sata DVD-RW 
CoolingOSMonitorMonitor
Noctua NH-U9B Windows 10 Pro Cheap 2560x1440 knock off Samsung T240HD  
KeyboardPowerCaseMouse
Logitech G910 Corsair TX750 Cooler Master HAF 932 Logitech G502 
Mouse PadAudio
Steel Series QcK+ SteelSeries Siberia Elite Prism 
CPUMotherboardGraphicsRAM
AMD Phenom X4 9500 Asus M3N78 Pro On board Corsair XMS2 DDR2 800 
Hard DriveHard DriveHard DriveHard Drive
Western Digital Velociraptor Samsung Sata Hitatchi Samsung 
Optical DriveCoolingOSPower
Polaroid USB DVD ROM Thermaltake TR2-R1 CentOS6 x86_64 Ultra 600W 
Case
Ultra X-Blaster 
  hide details  
Reply
Teh Gam3r
(18 items)
 
Home server
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 4770 Gigabyte GA-Z87X-D3H Z87 RT Gigabyte GTX 1070 G1 G Skill Cheapo DDR3 1600 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Solid 3 Seagate Crucial SSD LG Sata DVD-RW 
CoolingOSMonitorMonitor
Noctua NH-U9B Windows 10 Pro Cheap 2560x1440 knock off Samsung T240HD  
KeyboardPowerCaseMouse
Logitech G910 Corsair TX750 Cooler Master HAF 932 Logitech G502 
Mouse PadAudio
Steel Series QcK+ SteelSeries Siberia Elite Prism 
CPUMotherboardGraphicsRAM
AMD Phenom X4 9500 Asus M3N78 Pro On board Corsair XMS2 DDR2 800 
Hard DriveHard DriveHard DriveHard Drive
Western Digital Velociraptor Samsung Sata Hitatchi Samsung 
Optical DriveCoolingOSPower
Polaroid USB DVD ROM Thermaltake TR2-R1 CentOS6 x86_64 Ultra 600W 
Case
Ultra X-Blaster 
  hide details  
Reply
post #7 of 7
Thread Starter 
Quote:
Originally Posted by herkalurk View Post

I'll just say bacula sucks. Ran it on my centos home server with a LTO2 tape drive and the data management is ok (besides the fact they store everything as blobs in a mysql database, so no compression when backed up), but creating and managing backup schedules, nodes and include/exclude statements is all conf file based. NO ability to edit anything with gui, or with out restart to the whole server process. Maybe I'm just spoiled since I work on backups at work, and enterprise level stuff is way more robust, and less annoying.

Yeah, I still havent tried it and probably won't. I have my WordPress sites and DBs backed up, and just need to backup config and other things such as phpBB and zurmo. I don't want to have to deal with backups at the application level, but I may have to. frown.gif
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Servers
Overclock.net › Forums › Specialty Builds › Servers › Ideal backup method for CentOS VPS