News for hackers. Stuff that matters.
Re:FreeBSD 10.2 by zxcvcxz on Thursday August 13, 2015 @08:06PM (#10057921)
Is there an easy way to install a FreeBSD container on a Linux system?

For example, I can do

    # debootstrap --arch=amd64 unstable ~/debian-tree/
    # systemd-nspawn -D ~/debian-tree/
And be in a debian container. Is there a simple way to get a FreeBSD container?
Re:FreeBSD 10.2 by cperciva on Thursday August 13, 2015 @08:44PM (#10058045)
No, because Linux containers are still running the Linux kernel, and the Linux kernel doesn't know how to run FreeBSD binaries.

You can do the opposite however -- running Linux inside jails on FreeBSD hosts. This is how docker-on-freebsd works, and also how FreeBSD desktop systems usually cope with software like Flash plugins which are only available as Linux binaries.

Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @09:47PM (#10058222)
Btw, thanks for FreeBSD compat work for running on AWS/Xen, even if it might've been mostly to host Tarsnap on it. ;)

It's possible to run a NetBSD Xen dom0 (host system) on bare metal, under VMware or Xen HVM: it takes a few patches, building a kernel and config tweaks to get going but it works stably. [0] (There's no XAPI (the Xen remote management API) support however, so XenServer tools and other 3rd-party XAPI integrations probably won't work. FYI: XAPI server-side is coded in OCaml; don't ask how I know that. ;) [1])

For most people w/ baremetal or rented colo that just want a turn-key supportable hypervisor, I would advise using Citrix XenServer (commercial official Xen, free download, it seems be more stable than XCP and includes XAPI) or VMware ESXi (free download, very stable, $$$ quickly). After that, you can run whatever OS/es you like. (IIRC a ton of AWS boxes run heavily-modified Xen open-source 3.3.x.)

For desktop/laptop dev: VirtualBox, VMware Fusion/Workstation or qemu.

References:

0. https://wiki.netbsd.org/ports/xen/howto/

1. https://github.com/xapi-project/xen-api

EDIT: pronouns

Re:FreeBSD 10.2 by cperciva on Thursday August 13, 2015 @10:08PM (#10058282)
FreeBSD compat work on AWS/Xen

I did no such thing. My work was all to add AWS/Xen compatibility to FreeBSD. :-)

In all serious though, while wanting to host Tarsnap on an OS I knew and trusted was my justification for spending so much time on FreeBSD/EC2, my actual reason had more to do with wanting to make sure that FreeBSD didn't fall behind.

Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @10:28PM (#10058321)
Ah cool. Adoption is like a stochastic transfer function with a dependent variable "modern usability."

Speaking of usability, here's a patch to libfetch to ignore crusty ftp server non-RFC spurious responses https://gist.github.com/steakknife/b4772a5deb6afc8851e0 (I have absolute zero idea how to contribute code/patches to FreeBSD or it's not obvious/easy from docs.)

s/on/for/ That's what I meant. ;)

Re:FreeBSD 10.2 by pjmlp on Friday August 14, 2015 @03:09AM (#10058984)
> XAPI server-side is coded in OCaml; don't ask how I know that.

Everyone that follows Mirage should know that. ;)

I remember Anil saying something about it in one of his talks, if I am not mistaken.

Re:FreeBSD 10.2 by jstoiko on Thursday August 13, 2015 @09:54PM (#10058240)
Reminds me: I have to give tarsnap a shot
Re:FreeBSD 10.2 by msbarnett on Thursday August 13, 2015 @10:03PM (#10058269)
It's 100% excellent. Highly, highly recommended.
Re:FreeBSD 10.2 by tdurden on Thursday August 13, 2015 @10:10PM (#10058289)
Technically, I agree...however, you are trusting your backups to a one man operation.
Re:FreeBSD 10.2 by cperciva on Thursday August 13, 2015 @10:20PM (#10058306)
Not a one-man operation any more! Admittedly still a bus-factor-one operation though, since man #2 doesn't know how to keep everything running yet.
Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @11:11PM (#10058441)
Having done this a few dozen times:

A best practice is to ask the next new person to keep notes of obvious questions/unclear details to put in an internal, secure wiki. The issue, as founders, we often don't think about what is obvious to us when we deployed an app and all the server tweaks necessary to get it going, for teaching someone else or replicating what was done. Then, they learn some things and put them into the wiki. Rinse-later-repeat until there's few/no questions as the team grows.

It's continual DR/BCP housekeeping: architecture diagrams, instance inventory/config and other critical info (contact / escalation info) updated so that it's run-over-by-a-bus and EC2-burns-down (almost) resilient.

As you scale, having someone put server config all in Chef or Puppet (cfg management stored in git) will also help reduce deployment pain at the expense of initial setup pain. Initially, a wiki page containing a giant shell script for each server box kind is usually a faster hack.

Re:FreeBSD 10.2 by tdurden on Thursday August 13, 2015 @10:30PM (#10058326)
Great to hear!
Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @10:36PM (#10058339)
Just use multiple services for HA, which is a SPOF of selecting any one service regardless, not specific to Tarsnap. Also, check out Tahoe LAFS. Nonproblem strawman solved. :)
Re:FreeBSD 10.2 by tdurden on Thursday August 13, 2015 @10:38PM (#10058348)
that's not the point
Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @10:40PM (#10058353)
What's the point? Tarsnap is modestly cheap and extremely secure, and there other backup services which are equally cheap and almost as secure. Use at least 2x services always, so Tarsnap going down or bust (heaven forbid) isn't a big deal. There is never a perfect real-world solution, but risk mitigations that reduce risk at a higher levels of abstraction is how to get real, production-grade fault-tolerance the easier way than dredging up edge-case issues without offering usable alternatives.

SpiderOak uses end-to-end encryption, but I wouldn't trust it completely https://spideroak.com/opendownload

rsync.net is also pretty usable, but I wouldn't trust there is any in-flight or at-rest security http://www.rsync.net/

Tahoe LAFS provider https://leastauthority.com/ (it's possible to run your own Tahoe LAFS servers on cloud/colo boxes on several providers)

The best-practice mitigation to allow backups on less secure providers is encrypt locally (end-to-end encryption effectively) and distribute restore keys to a decent quorum of managers/founders/supervisors.

Having done offsite LTO tape vaulting and formal disaster recovery / business continuity planning at the organization level, it's a whole lot cheaper, easier and more flexible to use multiple cloud providers for most real use-cases (apart from multiple PiB datasets).

Re:FreeBSD 10.2 by rsync on Friday August 14, 2015 @12:12AM (#10058585)
"rsync.net is also pretty usable, but I wouldn't trust there is any in-flight or at-rest security http://www.rsync.net/"

rsync.net service is only available over SSH, so there's your in-flight security.

An rsync.net filesystem is an empty filesystem for you to do with as you see fit, so encryption at rest is completely up to you.[1][2]

Related: rsync.net accepts ZFS send/recv over SSH.

As always, ask about the HN readers discount.

[1] duplicity.nongnu.org [2] https://raymii.org/s/articles/Set_up_your_own_truly_secure_e...

Re:FreeBSD 10.2 by tdurden on Thursday August 13, 2015 @10:47PM (#10058370)
The point was that trusting all your backups to a one-man operation is not particularly wise, though cperciva provided more information. HA and using multiple services was not part of the conversation.
Re:FreeBSD 10.2 by bigiain on Friday August 14, 2015 @12:30AM (#10058634)
Being in a position where your off-site backups becoming unavailable is "not particularly wise" means you got _other_ problems to solve.

If my offsite backups vanished (the building they're in burnt down, for example) I'd a) know about it promptly, and b) arrange additional copies and security for my current set of on-site backups. Just the same if as if Colin gets hit by that bus and his service goes down without anyone knowing how to, or caring about, bringing it back up.

If Tarsnap is a single point of failure for you, you're doing it wrong.

Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @11:04PM (#10058418)
Fault-tolerant backup architectures are cheaper and more reliable than depending on any one service, regardless of due-diligence outcome on them. Any shop of any sensible size/scale would mitigate risks accordingly, or risk losing all their data and going out of business within a few months.

The end.

Re:FreeBSD 10.2 by feld on Thursday August 13, 2015 @10:40PM (#10058354)
install sysutils/acts to make it dead simple

Just start with this and you'll have backups in less than 5 mins

http://blog.feld.me/posts/2015/05/braindead-freebsd-backups-...

Re:FreeBSD 10.2 by bmir-alum-007 on Thursday August 13, 2015 @11:30PM (#10058500)
Nice! For larger sites, having a NAS/SAN setup with enough cheapo spinning-rust is a good way to consolidate onsite->offsite backups (using multiple providers).

0. Use backup agents for local boxes to make a compressed, encrypted backup to the NAS/SAN on some host-unique temporary dir on the same volume as the offsite dir.

1. Test restores of backups to throwaway VMs before blessing them as good for offsite storage. Fail any backups that fail this test. (Very important for checking backup jobs and restore automation processes. An untested backup == not a backup.)

2. Use mv to move the compressed backup from host-unique dir into the offsite dir.

3. Continuously replicate the offsite dir to offsite providers.

4. Prune old jobs as needed, which then replicates. (Be sure to set provider-specific previous backup retentions appropriately, to avoid error replication issues.)

5. Sleep at night.

Re:FreeBSD 10.2 by Khaine on Friday August 14, 2015 @12:39AM (#10058649)
Thanks for the great advice :)
Re:FreeBSD 10.2 by e-Minguez on Friday August 14, 2015 @05:40AM (#10059309)
Not a container, but maybe you can take a look at vagrant (vagrant box add freebsd/FreeBSD-10.2-RELEASE and it is done)