[SOLVED] NAS / Backup solution used by Slackware users
SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I run a somewhat similar setup to yours (but my server also does Asterisk VoIP for a few extensions). I have tried ZoneMinder in the past, and although the interface is somewhat featureful, I found it slow and bloated and inefficient overall. I fell back on using Motion, and sharing out the recorded videos over Samba to be viewed with VLC (or any other media player) on client computers.
When I built my most recent server, I was quite concerned with power consumption. I was trying to get as close to 10W idle as possible. I am currently using an Intel Atom D510 motherboard (great shame Intel has stopped making Atom motherboards). It is fanless, quiet and low power. However, it still has enough power to comfortably:
1. Run motion detection for 3 cctv cameras at 800x600 5fps and record in h.264.
2. Run Asterisk with two SIP trunks and 3 internal SIP extensions.
3. Run OpenVPN, samba, firewall, backups, imap email, light web server, postgresql etc.
Linux (and Slackware in particular) is so efficient, I don't understand why people go for full blown processors for serving a few files out. Heck, I run entire small companies setups on AMD Duron's processors from '99 with plenty of oomph to spare. Then again, if you do something more power intensive - that's a different story.
I also use 3 x USB portable hard-disks to backup the server.
For backup, I use Burp (http://burp.grke.org/). After years of searching and trying various backup options, including various rsync scripts and setups, I've discovered Burp. It has the following features, which are what I want from a backup:
1. Windows and Linux clients.
2. The clients contact the server periodically and automatically attempt a backup. The server decides if enough time has passed since their last backup or not (all configurable).
3. The client doesn't have any ports open listening for a connection from the server - so I don't have to worry about laptops travelling on other networks and being vulnerable.
4. The connection between the server an client is secured with SSL certificates (but I don't really need it as I run everything through OpenVPN for offsite connections).
5. The backups are stored as plain files (or individually compressed, configurable). It is easy to find an old file in the archive without using the burp interface.
6. It can resume interrupted backups - so a laptop which travels and only gets short windows of opportunity to complete a backup will eventually finish the backup to the server.
7. The latest backup is full, the previous ones are only reverse deltas of changes made in between.
8. It is actually based on librsync, which uses the rsync protocol.
9. It can be set to email (from the server) reports in case of failure or success.
10. I've cobbled some simple bash scripts which are triggered by burp before and after nightly server backups - which will email me if something has gone wrong.
11. It is also possible (but I didn't get to do this yet) to have a regular script run which will alert you if the backup from the client to the server hasn't successfully completed in a number of days. In my case it isn't worth activating alerts on every failure - as my laptop will attempt a number of times to finish a backup if I'm travelling between sites - and fail to finish for a while - every time I close the lid and move on somewhere else. But it will normally finish eventually. Thus I don't want to be alerted on every failure - but I would like to know if it hasn't completed a successful backup in say, 3 days. I'll get this done soon.
I use burp both for automatic backups from the clients (desktops or laptops) to the server, and for the nightly backup hoovering the data from the server into an external usb hdd plugged into the server. This gets changed regularly.
One nice added bonus is that, when I'm on holiday, my laptop will backup my saved holiday photos to the server at home as I go along - which is quite nice specially when travelling abroad and the laptop might get stolen or damaged before arriving back home.
I'm a great believer in using commodity hardware as much as possible. It is cheap, flexible and easily replaceable in case of failure. A low power and preferably fanless motherboard (either microATX or miniITX) with either an Atom or one of the low power Celerons, two internal SATA hdd's in RAID mirror mode, a few external usb hdd's, a small UPS to protect against brown-outs, black-outs and power spikes - and you've got everything you need for a long term solution. With plenty standard connectors, interfaces and an easy to install and configure x86 architecture.
Thank you for all your information. Your configuration/needs are very similar then mine except that I do not have Asterisk running. Your backup solution sounds interesting I will take a look into this. I connect as well from the outside to backup holiday photos and my wive is watching TV series by using squid over ssh (for content only available inside Canada).
I did some calculation putting a server together with commodity hardware and it is really not getting much cheaper then buying a T140 with an i3 CPU at my location.
I have not decided yet what solution I should go for and still open for any other users feedback.
One aspect I'd consider is power consumption for reasons of costs and environmental protection. The first may not be as much an issue in Canada as it is in many European countries, but the latter is something that, to my knowledge, Canadians are usually concerned about (all the Canadians I know in person, at least, are). "Real" servers often use a lot more power than NAS boxes. Not necessarily though, and with a thorough selection of components (power supply, graphics adapter) plus a smart setup to save power a server can run at reduced CPU frequency, park its disks etc. and eventually come quite close to the level of power consumption of a typical NAS box.
While such a server box requires more thorough planning and more effort to set it up, it will in the end be a much more capable and flexible system, and still be relatively quiet (more or less important depending where you place it) with low power consumption.
Last edited by gargamel; 01-05-2014 at 09:58 PM.
Reason: Minor corrections, no change of content or meaning
One aspect I'd consider is power consumption for reasons of costs and environmental protection. ...
That is correct that we should take care about environmental aspects and power consumption. This is also the reason why one of my possible solutions is just having a higher end NAS like QNAP or Synology where I can as well run a web server, DB, etc. with some USB disks as backup solution.
This is also the reason why one of my possible solutions is just having a higher end NAS like QNAP or Synology where I can as well run a web server, DB, etc. with some USB disks as backup solution.
I haven't used a NAS box yet, but I'm not really sure I understand the attraction of brand name NAS boxes in general versus building one's own or using a regular computer or server as a NAS. After all, the low end QNAP boxes are based on an Atom processor with 256MB-1024MB of RAM. Many of them can't even have the RAM upgraded and have no VGA port. For what they cost, one could easily build a box with an Atom or some other low end CPU in, and have more flexibility and upgradeability - for less money. Do they offer some features which can't be gotten with Linux software out of a regular motherboard and 2-4 hdd's? Surely They are not going to use much less power than a similarly specced Atom box with the same number of hard-disks, or do they?
I mostly agree. However, it's a lot of work to set up a server to mimic the functionality and behaviour you get out-of-the-box with NAS. Spending a little money and accepting some limitations regarding upgradeability, scalability and flexibility can save you many hours of planning, assembling, experimenting and setting things up.
Regarding where you want to place the device, heat and noise are factors to consider.
You can do this all yourself and the result can be great, but it takes quite some knowledge to select the appropriate components starting with the case over CPU and motherbord to power supply, and you have to invest a significant amount of time and effort. Moneywise, your savings won't be that high. And, BTW, I got my NAS box for a price that was lower than if I had bought the two hard disks that came with it separately. It is a slow NAS box, not up to what Synology and Qnap offer, but it does what I want it to do.
If you interpret that as "you will learn a lot of useful tech if you setup a server" suddenly there is a lot of value in not going for NAS.
I use my own LAN server as a playground for gaining knowledge. Very useful if you work in IT.
However, if you are not in IT infrastructure business and have a lot of interest in following recent hardware developments, the question is, if it will pay off for you to acquire all the required knowledge regarding hardware and software, security and networking protocols, for the one-time task to set up an NAS-like file and multimedia server. If you can re-use some of it later in another context, it may be well worth it, and can be a lot of fun.
However, if you just need a solution for a given task as a user, you should weigh the advantages of a more capable, scalable and flexible system that is fully customised exactly to your needs plus the chance to learn a lot against the comfort of a more limited, less flexible and less scalable out-of-the-box solution for your current task.
Both approaches have their pros and cons, and I guess it depends on where you start from, regarding knowledge and skills, and where you want to get, regarding the results, which way to go. Different approaches for different people and different situations.
Yes - I think this is a very interesting debate. Sorry to the OP for mildly hijacking the thread - although I guess we are still sticking to the context to a good extent. I always debate with myself when setting up new technology if it is the sort of stuff I am likely to need again and re-use the knowledge. With limited time available for everything, I guess that is always an important consideration. Than again, that doesn't seem to have stopped me from hacking away at all sorts of stuff - I guess old habits die hard
Last edited by xj25vm; 01-06-2014 at 03:11 PM.
Yes - I think this is a very interesting debate. Sorry to the OP for mildly hijacking the thread
You don't have to be sorry, I asked on this forum to get different ideas and this is the goal of my thread. Another point to consider is also the acceptance of the family to be willing to accept that during the 'learning phase' thinks can 'break' or not be accessible for a specific time. It's like in the office where the people only realize what the IT department is doing when thinks go wrong or change without proper training.
For now I prefer a 'server' solution build on Slackware because I am familiar with it. All the NAS that I checked (QNAP, Synology, LenovoEMC (Iomega)) have some points not fitting my needs like cameras not supported, not running the same media server, etc. A workstation/server can be upgraded or parts replaced in an easier way. For backup a simple external hard drive can be used because speed is not important for this task. 'The cloud' can be used for some less personal parts of the backup but I like to have the rest at home with accepting the risk of fire, water, etc.
This is just a thought; I use an extremely simple utility called cpbk in a script called from rc.local_shutdown to back up to a second drive in my desktop and also to an external drive usb drive if it is connected and mounted. In the past when I had a server for printing scanning and NFS I file shares I would use cpbk to back up selected directories to that server when a box shut down. I have a couple rasbpi's here and it wouldn't be much work to set up NFS file shares to the pi in my shop connect a usb drive to the pi and back up externally from my desktop in the house to the pi in my shop. This would also put the backup in different building. Personally I don't see a need to involve a server. Small arm plugs or raspberry pi's are cheap and low overhead and this solution (for me) would be wifi. Once the initial backup is made with cpbk, only new/modified files are backed up and deleted files removed, doesn't take much time at all.
Might not be a corporate solution but it may be a consideration for some folks or small biz's. Cpbk is old (1998) but source can still be found in Debian repositories and the man page exists on the net if you want to have a squiz.
Small arm plugs or raspberry pi's are cheap and low overhead and this solution (for me) would be wifi. Once the initial backup is made with cpbk, only new/modified files are backed up and deleted files removed, doesn't take much time at all.
The biggest downside I find with commodity ARM based boards such as the plugs or the Pi is the lack of SATA ports. There are two drawbacks with using USB for storage in the long term. First, I find it is not stable and robust enough. Yes, it works for manual type backups. But for some reason I find that when it is used every night in the long term, sooner or later it starts giving problems. I have about 10 servers at various locations using USB hdd's for external backups, and sooner or later these start giving problems and I have to fiddle with them every few months. Be it that they don't get enough power and they conk out during a long backup, or somehow they develop file system issues - one way or another they just don't seem as robust as SATA. This would become doubly more significant if they are the main storage of the server.
The second problem is the lack of SMART support. I don't even know if this is available at all on the ARM architecture. But if I have a server, big or small, humming away in a corner by itself, I don't want it to start developing faulty sectors on the hdd and for me to find out when it's too late. I need SMART so it can run regular tests and email me as soon as the hard-disk is going down the tubes. Without it, I'm not prepared to entrust my important data to it - even if it is just a small little server and not an industrial one.
And not to mention that once you have more than one usb hdd plugged in, you hit the problems associated with USB not providing enough power for them, with various USB implementations supplying various amounts of power and various external hard-disks varying in how much power they need, and having to fiddle with extra usb hubs and extra power supplies. I believe the Pi was also suffering from some power issues on the usb port - unless they have been sorted.
Lots of people mention ARM based boxes as a micro-server - but I don't see many saying they've had one running for years and years doing solid work (specially on the storage side) and taking a hammering. Please note I am still talking about commodity ARM boards which can be repurposed - such as the Pi, OpenWRT routers etc. - not purpose built NAS boxes based on ARM processors. So from where I'm standing, they are not a sufficient option even for a small server - at least not yet. Once we can get proper ARM boards, with SATA ports, that can plug into bigger power supplies (say at least a 30W-60W peak power - to have enough headroom) so they can reliably feed a couple of hdd's and whatever other peripherals are about - then things will be looking more promising.
Yes, I would probably never consider my above option if I were in your shoes. That being said, I'm a garden variety user with no longer a need for even printer and nfs shares. I've never had a problem with my usb drives once I reformatted them to something other than vfat or nfs removing prop. factory installed software in the process. That being said, I have never run them 24/7/52. Mine is backed up if and when connected which is not always.