LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 05-17-2015, 01:00 AM   #1
ohmster
Member
 
Registered: May 2005
Location: South Florida
Distribution: CentOS 7
Posts: 39

Rep: Reputation: 2
Question Simple CentOS 7 backup setup needed


EDIT: I apologize for asking such a common question and yes, I can Google for it. The point is that I *trust* the members of this forum to give me good advice. By doing a 'yum search backup', I got 38 results. I do not want to waste time fooling with the wrong thing or worse, wrecking my new system with packages I don't need, won't work, or could mess things up later. Yum list at bottom of message.

I have always had a running Linux server/desktop since getting the brand new Red Hat 6.0 box set for Christmas. Live CDs and Dual Boot just do not cut it. A 24/7 running machine plus FQDN is where the fun really starts!

This has always been a hobby, learning tool, and fun, but I just got a P4 64bit 3.6GHz machine, 4 sticks good 1Tb RAM, 1 Tb SATA hard drive, and a GeForce 9600 card. I now make money with the machine by mounting my $HOME/pubic_html folder as a Windows share and using Dreamweaver to make and edit the sites. The beauty of this setup is that I have a working test server with apache on the machine. I can access locally with IP/~user/<sitename folder> or remotely with http://FQDN/~user/<sitename folder>. I really need a backup plan with scheduling. Once I move the hard drive from the old CentOS 6.6 machine to the new CentOS 7 machine as a storage drive, I can move my public_html directory, recursive, over to the 1Tb drive. Then I have only one hard drive to backup. Webmin is installed if it could be put to use.

Can some of you please help me decide on a backup plan? I never setup a Linux backup before so I am not sure how to do this. I will have a little less than 300 Gb of data on the 1Tb SATA drive to backup. What is the easiest and best way to do this? Can I use an external USB drive and some sort of script to run with cron to make incremental backups or what would you guys suggest? I do not have raids or multiple drives to backup so this should be fairly simple.

Can you guys give me some scripts, links, or instructions on how to do this easily and effectively, at little to no cost, disability does not give much money for "toys" and I do have a couple of USB drives lying around, a 500 Gb and a 750 Gb USB drive that work great. I might even have a 1Tb USB drive in the junkbox, have to hunt for and test it. I see someone is recommending Dirvish in another thread, not sure if this is good for me. Thanks guys!

Results of 'yum search backup':
[paul@ohmster ~]$ yum search backup
Loaded plugins: fastestmirror, langpacks, priorities
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: mirror.metrocast.net
* centosplus: mirror.metrocast.net
* elrepo: reflector.westga.edu
* epel: reflector.westga.edu
* extras: mirror.metrocast.net
* nux-dextop: mirror.li.nux.ro
* rpmforge: mirror.teklinks.com
* rpmforge-extras: mirror.teklinks.com
* updates: mirror.metrocast.net
429 packages excluded due to repository priority protections
=========================================================== N/S matched: backup ============================================================
BackupPC.x86_64 : High-performance backup system
amanda.x86_64 : A network-capable tape backup solution
backupninja.noarch : Lightweight, extensible backup system
mylvmbackup.noarch : Utility for creating MySQL backups via LVM snapshots
rdiff-backup.x86_64 : Convenient and transparent local/remote incremental mirror/backup
BackupPC-debuginfo.x86_64 : Debug information for package BackupPC
MySQL-zrm.noarch : MySQL backup manager
dar.x86_64 : Software for making/restoring incremental CD/DVD backups
deja-dup.x86_64 : Simple backup tool and frontend for duplicity
duplicity.x86_64 : Encrypted bandwidth-efficient backup using rsync algorithm
dvdbackup.x86_64 : Command line tool for ripping video DVDs
fsarchiver.x86_64 : Safe and flexible file-system backup/deployment tool
fuse-rdiff-backup-fs.x86_64 : Filesystem in userspace for rdiff-backup repositories
holland.noarch : Pluggable Backup Framework
holland-xtrabackup.noarch : Xtrabackup plugin for Holland
kbackup.x86_64 : Back up your data in a simple, user friendly way
snapraid.x86_64 : Disk array backup for many large rarely-changed files
zbackup.x86_64 : A versatile deduplicating backup tool
amanda-client.x86_64 : The client component of the AMANDA tape backup system
amanda-server.x86_64 : The server side of the AMANDA tape backup system
bacula-client.x86_64 : Bacula backup client
dd_rescue.x86_64 : Fault tolerant "dd" utility for rescuing data from bad media
dump.i686 : Programs for backing up and restoring ext2/ext3 filesystems
duply.noarch : Wrapper for duplicity
grsync.x86_64 : A Gtk+ GUI for rsync
holland-mysqldump.noarch : Logical mysqldump backup plugin for Holland
holland-mysqllvm.noarch : Holland LVM snapshot backup plugin for MySQL
holland-pgdump.noarch : Holland Backup Provider for PostgreSQL
httrack.x86_64 : Website copier and offline browser
owncloud.noarch : Private file sync and share server
pgpdump.x86_64 : PGP packet visualizer
rbme.noarch : Rsync Backup Made Easy
rdist.x86_64 : Maintains identical copies of files on multiple machines
rear.noarch : Relax-and-Recover is a Linux disaster recovery and system migration tool
rsnapshot.noarch : Local and remote filesystem snapshot utility
rsync.x86_64 : A program for synchronizing files over a network
tarsnap.x86_64 : Online encrypted backup service (client)

Name and summary matches only, use "search all" for everything.
[paul@ohmster ~]$


The very first return on the search, "BackupPC.x86_64" sounds pretty good but I am sure that you guys would know better than I do what would be best. A GUI front end would be nice but is not necessary. I run the machine in level 3 or "multi-user.target" as it is now called. I use startx to run the xserver. Run Mate Desktop with Compiz-Fusion and Caja File Manager. I also visit my machine quite frequently with webmin and PuTTY over ssh. Some good suggestions are all I ask. I do not need "hand holding" as much as I need a shove in the right direction. Thank you again for your patience.

Last edited by ohmster; 05-17-2015 at 01:32 AM. Reason: apologies for such a common question
 
Old 05-17-2015, 04:25 AM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
I would say Bacula would be good choice, I am using it for my servers and it does have a GUI as well. Here is a good document which can help you out with installation and configuration of Bacula: https://www.digitalocean.com/communi...er-on-centos-7

Bacula is my personal choice for free / opensource backup software. Wait for other members to reply and see what they have to say about backup softwares.
 
1 members found this post helpful.
Old 05-17-2015, 06:39 AM   #3
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
ohmster,

Somebody else in a similar situation here with CentOS:

https://www.centos.org/forums/viewtopic.php?t=21627

In addition to Bacula, Rsync, Rsync Backup Made Easy or rsnapshot are likely candidates for what you require.

Alternatively create a custom backup script similar to this:
http://www.broexperts.com/2012/06/ho...tar-cron-jobs/
 
1 members found this post helpful.
Old 05-17-2015, 12:25 PM   #4
ohmster
Member
 
Registered: May 2005
Location: South Florida
Distribution: CentOS 7
Posts: 39

Original Poster
Rep: Reputation: 2
Cool Thanks for the great links!

Plenty of Thanks here and some friendly banter. One question remains, the tar/cron answer is most simple for me at first, Bacula looks like overkill but might be good. The tar/cron option gives me nothing for a hard disk image to restore. Do you guys "image your disks" and restore them in the event of a total hard drive failure? If so, how? Do you use dd and in what syntax? How would you restore such an image anyway? Or am I better off with Ghost or True Image manually for imaging disks?

Wow, thank you all very much for the great URLs to check out. I had a LOT of fun reading "the other thread" where dgingeri, the Windows guy, is very frustrated with the complexity of Linux backup options and preferences for CLI input to setup, run, and control the backup. I can easily sit on either side of his fence and sympathize with both parties. dgingeri is "spoiled" buy the new Microsoft Backup built into Windows 7. It is free, already there, easy to setup and run, and all you need is a USB drive to plug in. Much of Linux software does not run this way. Daemons to run, conf files to configure, cron for scheduling, and complex tar commands with arguments. I could just "see the guy crying" reading this stuff. NOT what he wants to hear. At the very end of the discussion, TrevorH scratches his head and replies in typical Linux fashion:

"Script it, stick it in crontab, forget it (until it goes wrong)."

Which I understand very well.

Some distro along the ling gave me a "scripts" directory which was empty and I had NO IDEA of what this was for. Now my scripts directory is in my path and filled with useful tools that run by cron and allow me to perform complex command line executions by typing the short script name. ZoneEdit uses a fairly simple wget command to update it's DNS servers to your IP and FQDN. It is way too long to type out but easy as heck to run in a scheduled cron job. I admit to "cheating" on cron. Doing it by hand and remembering that syntax is beyond me without a reference. But webmin makes cron jobs a treat! I put the ZoneEdit Dynamic DNS wget ling in webmin cron command line, substituting my own user name and password, schedule it to run every day at 1:00 AM and always have my FQDN work. "Cheating at cron with webmin" is not really cheating, it does produce the proper crontab entry.

[paul@PPC-WORKS ~]$ sudo crontab -l
0 13 * * * wget -O - --http...
(cut to reduce length)

Same thing wtih vi. I would only use pico or nano editors because that is all I could manage. But my friend Gary would always use vi or vim. Once I learned enough vim commands to be useful, it is my editor of choice. I keep a desk reference handy and there is an entire chapter of vim commands and movements, vim is very powerful. No way I will even touch emacs

What am I going to do? Not sure yet. On the fence between the tar/cron page and Bacula. Neither one is perfect. The tar/cron is over simplified but will do excellent data backups, but not make hard drive images in the event the entire hard drive fails. Bacula is *very* complicated at first glance. I will have to setup MySQL which I have done many times for things like Coppermine Photo Gallery. phpMyAdmin will probably help with that. I have always used that tool in the past to get the database setup and running.

There is one more option I need to ask you all about:
I like webmin and use it all the time. It has a module for "Filesystem Backup" which is currently unused. It offers to backup directories for you in tar format if you wish and has a restore button to "put it all back". Since I have not tried it, how good is this system? Is it something I can seriously use? Will it backup to a USB drive? Does anyone know? Something like this is the same as the tar/cron page but is done via webmin interface. I see no area for scheduling but that might be due to the fact I have never set it up. Is the webmin "Filesystems Backup" worthy of a try? I know, I know, you guys are laughing and would never even consider such a crude tool like webmin for backups, but it might get me on safe ground while I figure out something better.

DOH! The webmin docs page on Filesystem Backup module does show scheduling and give all the instructions. This might "get me on safe ground for the time being". Ack! The docs say you can backup to the same filesystem (dumb) or to a "tape system" (Kidding me, right?). But what if I sub the usb drive for the tape drive in webmin? Let me plug it in and see what it offers. It self mounts and shows up as /dev/sdb1 on /run/media/paul/My Passport. I have been using this in Windows and am sure that I will have to reformat this somehow for use in Linux. fdisk does not seem to like this disk. What is the problem, do you think it must be partitioned and formatted? Works fine in Windows.

[paul@ohmster dev]$ sudo fdisk sdb1
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p

Disk sdb1: 750.1 GB, 750120861696 bytes, 1465079808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x69205244

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
sdb1p1 ? 218129509 1920119918 850995205 72 Unknown
sdb1p2 ? 729050177 1273024900 271987362 74 Unknown
sdb1p3 ? 168653938 168653938 0 65 Novell Netware 386
sdb1p4 2692939776 2692991410 25817+ 0 Empty

Partition table entries are not in disk order

Command (m for help): q


What is with all of these "blocks"? I thought this was a simple USB drive, single partition, single file system. I found a 1Tb Seagage USB drive w/external power supply, this thing is huge! 9SF2A4-500. In Windows it shows up totally empty NTFS drive. But Linux fdisk has a different point of view:

Disk sdb1: 1000.2 GB, 1000202043392 bytes, 1953519616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x6e697373

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
sdb1p1 ? 1936269394 3772285809 918008208 4f QNX4.x 3rd part
sdb1p2 ? 1917848077 2462285169 272218546+ 73 Unknown
sdb1p3 ? 1818575915 2362751050 272087568 2b Unknown
sdb1p4 ? 2844524554 2844579527 27487 61 SpeedStor

Partition table entries are not in disk order

Command (m for help): q


Where are all of these partitions or "blocks" coming from? Surely I cannot use this drive the way it is. I get a disturbing message in the CentOS 7 disk GUI on this drive: "Disk is OK but one attribute failed in the past". What do I need to prep a USB drive for Linux backup use? dd (syntax please) or use Partition Wizard on it or another boot to disc tool for partitioning and formatting? Filesystem of choice? ext3, ext4, or something else?

I want to try this route for now with the Passport USB drive and webmin as it appears to be quite simple to setup and run and would meet my immediate needs but for system image. What must I do to this USB drive to make it a usable backup drive in CentOS 7? Unless you fellows are dead set against it and I am sure you will tell me why.

I will no doubt Ghost or Acronis True Image the hard drive at first "just to have" in case something goes horribly wrong. Then use webmin backup module or setup the tar/cron thing to backup my important stuff like the public_html directories that contain active websites. The public_html directory will be exported by samba as a Windows share and mounted in Windows for Dreamweaver access, already is setup for that. Then, as I have time, see for real if this Bacula is a serious option that I can use w/out overkill.

The CentOS 5 Backup discussion page is excellent reading! No one seriously takes offense and everyone gives a valid point of view. On the comical side is the comment "What can we say we are all sadomasochists" and on the serious side is ".... seriously though unfortunately many of us are having to worry about dozens to hundreds to even thousands of machines, which is part of the reason many of the tools are capable of such overkill."

THAT is why I trust all of you. You are system administrators with lifetimes of serious experience! ...We're not worthty, we're not worthy!

I will have to experiment with what I know like tar/cron, then move on to something more robust. I promise to come back and mark this thread as "SOLVED" when I reach a definitive answer and have it tested.

Thank you
, very much, all of you, for your patience with so much to read. Eagerly waiting your comments, especially what to do with the USB backup drive to prep it for Linux backup. "...I'll be back!"

Last edited by ohmster; 05-17-2015 at 02:25 PM. Reason: url, found new drive
 
Old 05-20-2015, 12:38 AM   #5
bristolrecovery
LQ Newbie
 
Registered: May 2015
Location: bristol.UK
Posts: 1

Rep: Reputation: 0
Your case is pretty complicated and I will suggest you to visit a professional service provider of Data Recovery they will guide you in the most proper way.

bristoldatarecovery.co.uk
 
Old 05-20-2015, 10:17 PM   #6
ohmster
Member
 
Registered: May 2005
Location: South Florida
Distribution: CentOS 7
Posts: 39

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bristolrecovery View Post
Your case is pretty complicated and I will suggest you to visit a professional service provider of Data Recovery they will guide you in the most proper way.

bristoldatarecovery.co.uk
LOL!

I am surprised that you did not include a phone number or URL for your "professional company" to discuss "data protection solutions and proposals for my mission critical company". Seriously, it really looks like an ad for service and I thought it was funny, in a cute sort of way, as your title is "LQ Newbie" like me shows me you are not some Linux Pro company that is scouting for clients on the forums and that is a violation of the board TOS. I know that you are serious and not trying to "sell me something". Actually, this is not complicated at all. I have a single Linux PC in my house, all the time running. I use the servers on it, apache for my own personal web page, since it is not "mission critical", ftp server running for me and my friends, and local mail server for the fun and experience of learning. I had a "real online domain sendmail setup with MX records" until Comcast pulled the plug on port 25 and put and end to those days. (That was a MAJOR HEADACHE! Constantly being hit on by spammers trying to hack my mail server.) This is all a fun hobby for me. None of it is super critical but it would be like seeing the wooden boat model you worked on for years to make perfect, fall and get stepped on by accident, crushing it into hundreds of pieces if I lost everything. I would not lose any money over it, but it would make me want to cry.

True, I export the public_html directory and use it as a mounted drive in Windows 7 and use Dreamweaver to make and edit sites for my clients. In that respect, the /home/paul/public_html directory is pretty important because it contains all of my clients websites. If I truly lost it, I could pull the entire site back down with CuteFTP or even use Dreamweaver to synch my local location to the online server to get the really important stuff back. But bristolrecovery, this is "just a fun hobby" that I have enjoyed since I got my Red Hat 6.0 Box Set for Christmas. I do not remember how long ago that was but it was many decades ago.

I have a single hard drive. I want to keep it backed up. The really important web sites are not often updated. The rsync bash script that jlinkels gave me is more than enough to really suit my needs. It is fast, it got the important stuff backed up on an external USB backup drive, surprisingly fast. All ownerships and permissions were kept in place. It is incremental and run by cron every morning. This is great! If I had to, I could easily reinstall my distro on again, setup the servers, and my data is all intact. I could use 'cp -a' or rsync again to put that public_html back. I would love to image the hard drive to avoid putting the entire system back from scratch and I will accomplish it with Acronis (Acronis True Image 2014 did offer to backup the drive safely with a sector by sector approach since the LVM partitions it could not read as files.) and will just do that to get it done. I ask so many questions and experiment with different methods to learn this stuff. I enjoy it, my friend.

Thank you very much for your concern, bristolrecovery. If I were really running a business on this PC, this would be invaluable and irreplaceable data that would cost thousands of dollars in recovery fees if something really bad happened. That was exactly the "right answer" for someone like that. But I am a hobbyist and this is one of my fun and challenging hobbies. I show a LOT of respect to the professional sysadmins that take the time to really answer my questions and heap on the praise and thanks for their efforts. Thank you too! I am good, even if this does not work out. I am trying to take a close to 10 year old, very good PC and make it useful with Linux and have a purpose in mind for it. Chances are, this will not work after all is said and done. I have cooling issues that should not be there and money IS a factor. I just checked the newly reinstalled cooler, seating, and paste and I am not convinced that I have 100 positive contact with the CPU. The markings on the heat sink paste do not indicate so. I might try a different cooler, if I have one in my junk box or can get a good one on the cheap.

Thank you for your concern. It is really nice to know that there *are* people out there that really do care!

Last edited by ohmster; 05-20-2015 at 10:19 PM.
 
Old 05-22-2015, 09:12 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Moved: This thread is more suitable in <CentOS> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply

Tags
backupoptions, centos7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed to setup a backup solution. robinselvam Linux - Software 1 01-27-2014 02:48 AM
CentOS 5.4 Backup Software Needed athomas Linux - Software 6 04-28-2010 08:31 AM
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 08:52 AM
Helpful advice needed for initial setup of CentOS 5 server running Tomcat JohnRock Linux - Newbie 14 05-05-2009 06:01 PM
simple backup script needed ferret_dude Programming 4 05-24-2004 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration