I've been wanting to build a backup server for my Mint desktop as well as for my Debian media server for a while now. To save money I purchased a Raspberry Pi 2 and I'm going to store it at a friends house who owns an ISP and thus has plenty of bandwidth, and I've lived through one house fire already so I don't feel safe about backing everything up here. As for backing up my home directory I could purchase an SSD or a traditional HD, but for all the media stored on my Debian media server I simply can not afford an SSD due to the massive storage capacity needed. I'd like some suggestions on HDs for my media and my Mint home directory should I decide to go with a HD. Here are some things that are on my mind. I'm a little leery of external HDs because I've seen them fail a lot but I don't see much of a way around it because the Raspberry Pi 2 will simply not have the ability to power an internal HD. So given that I will probably have to go with an external drive, should I use one that doesn't require a separate power source with USB being it's only connection or should I go with one that has an independent power source? I'm also concerned about power down issues. I would feel better if the drive would power down when it's not being used and thus would have a longer lifespan but I don't know if the RP 2 will power down the external drives or not. Also, if the RP 2 does power down the drives how will the machine know to to spin the drive up again? I think I'll be using backuppc or is it pcbackup, to perform these backups, will the RP 2 see backuppc trying to connect and then spin up the drives? Thanks for any input.

Dani AI

Generated

Brief, practical summary and next steps (expands on points from , , and )

Use a drive with its own power or a powered USB hub. The Pi 2’s USB ports aren’t meant to run a spinning 3.5" drive from VBUS alone — the board only exposes a limited downstream USB power budget, and the Pi itself also needs headroom. Put the 5 TB desktop external (it already has its own adapter) or a powered hub between Pi and any bus‑powered disks; that avoids brownouts and is the simplest, most reliable approach. (raspberrypi.com)

Be clear about spin‑down vs power‑off and how BackupPC will interact. You can arrange automatic spin‑down with tools like hdparm (standby/APM) or use udisksctl power-off to remove power from a USB device, but many USB‑SATA bridges don’t pass all ATA commands so hdparm may not work on every enclosure. If a drive is only spun down (still powered), any kernel access (BackupPC writing the pool) will normally wake it; if the drive’s power brick is unplugged or the hub port is physically cut, the Pi can’t remotely “spin it up.” For fully powered‑off behavior you’ll need either a hub that supports per‑port power switching or an enclosure that supports software power‑off. (en.linuxportal.info)

About BackupPC and your /etc/backuppc/pc mystery: BackupPC is a server that typically pulls backups from clients (rsync/ssh/tar); the web UI is an Apache CGI (or mod_perl) service. Debian packages sometimes create a pc symlink under /etc/backuppc which looks weird but is a packaging compatibility thing — it won’t break things. To expose the admin page you usually need an Apache alias to the package’s CGI dir. Example (add or enable similar snippet in Apache conf, then restart Apache):

Alias /backuppc /usr/share/backuppc/cgi-bin/
<Directory /usr/share/backuppc/cgi-bin/>
  Options ExecCGI FollowSymlinks
  AddHandler cgi-script .cgi
  AuthUserFile /etc/backuppc/htpasswd
  AuthType Basic
  AuthName "BackupPC admin"
  Require valid-user
</Directory>

See the BackupPC docs and Debian/packaging discussion for details and debugging steps. (backuppc.sourceforge.net)

Quick checklist to move forward

  • Test locally: run a manual BackupPC_dump and verify writes to the 5TB drive before relocating the Pi.
  • Keep the drive’s external PSU or use a good powered hub; check Pi supply is 2A+ (use official/quality adapter). (raspberrypi.com)
  • If you want one-cable simplicity later, consider a board with native SATA like suggested — it removes many USB/power headaches.

This should help get the hardware choices right and explain why BackupPC will wake a spun‑down but powered drive, why some enclosure/bridge combos block hdparm, and why that repeating pc directory you saw is expected with some Debian packages. (en.linuxportal.info)

Recommended Answers

All 7 Replies

Do you know much programming? Reason I ask is that if you intend to code your own 'server' software, you could implement a journaling type setup for your hard drive. You could do this with application code, doing so just requires some interesting interfaces etc. First found out about the template from mongo db, acutally had a nice little diagram. Basically you keep a journal of transactions as a temp file. It is a 3 way write. source -> jounal -> dest. If not, I don't necessarily know how you would do it. If you get a hard drive, you should probably check the operating voltages, since the raspberry pi's are notorious for not providing enough voltage for power hungry peripherals.

P.S. sounds a little like a drop box to me... jk.

I have been trying to learn to program for years. I've played around with C, C++, Python, & PHP but I would not dare call myself a programmer. I want to setup a remote server with lots for storate, I figured that Raspberry Pi 2 + hard drives would be a cheap way of achieving this goal, and I've heard good things about backuppc from Linux users.

Well, congrats you picked all the hard ones to learn. JK. I think OOP is a much better way to go most of the time. It seems easier to think of things as objects. Also be aware that the PI doesn't have much bandwidth. Which should be fine for a file server application. If you wanted to throw together an ftp server, that would probably require a lot of code, I haven't been exposed to that myself. If you want to make a web upload, that would probably be easier, but would require a site. A socket connection of some kind would actually probably do the trick a little bit better for your purposes. But I don't know.

Perhaps there's some pre-baked software somewhere?

I haven't used it yet but as of right now I'm still planning on using backuppc. I have many TBs to backup most of that up locally before deploying the server outside my home network. Then I'll only be backing up the difference when I run my backups.

I used to use BackupPC a lot, some years back. It was pretty good -- easy to restore files when I needed them. I used it to backup web servers. I did have some performance issues when I used a clunky old desktop machine as the server.

The one thing it took me a little time to figure out was the ssh keys. If you need any help with that, let me know.

It sounds like you already have the Pi, but I got a cubieboard for this purpose because it has an actual SATA port. I've got a 1TB 2.5" drive, powered through the cubieboard (Just make sure your power supply is at least 2amps or better!).

I'm going to look into this cubieboard thing, that sounds ineteresting. I've got the PI 2 and a 5 TB external HD with it's own power source. What I want to do now is to use backuppc to backup my Debian media server and my Mint desktop to the USB external HD. After the backup is completed localy I can then move the PI 2 to it's remote location and start regular scheduled backups. But at this point I am stuck because I don't know how to use backuppc, I have it intalled but I don't know how to launch it in the browser. Once I have backedup everthing localy and move the PI 2 to it's remote location I want to the backups to be initiated from my Mint desktop and my Debian media server, so what I'm wanting is for the machines in my house to be the server and the source and the PI 2 and it's acompianying 5 TB extern HDD to be the destination. Is this a possible setup and can anyone help me with this?

Also, I was just looking the the backuppc directory /etc/backuppc and I seem to have found an infinate regretion of directories. Could someone please explain.

garrett@mint-desktop /etc/backuppc/pc $ ls
apache.conf  config.pl  hosts  htpasswd  localhost.pl  pc
garrett@mint-desktop /etc/backuppc/pc $ cd pc/
garrett@mint-desktop /etc/backuppc/pc/pc $ ls
apache.conf  config.pl  hosts  htpasswd  localhost.pl  pc
garrett@mint-desktop /etc/backuppc/pc/pc $ cd pc/
garrett@mint-desktop /etc/backuppc/pc/pc/pc $ ls
apache.conf  config.pl  hosts  htpasswd  localhost.pl  pc
garrett@mint-desktop /etc/backuppc/pc/pc/pc $ cd pc
garrett@mint-desktop /etc/backuppc/pc/pc/pc/pc $ ls
apache.conf  config.pl  hosts  htpasswd  localhost.pl  pc
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.