diff options
| author | Paul Buetow <git@mx.buetow.org> | 2021-05-25 19:37:39 +0100 |
|---|---|---|
| committer | Paul Buetow <git@mx.buetow.org> | 2021-05-25 19:37:39 +0100 |
| commit | 11f7671024607c17c3bbce930c7c7a4ae94b0f5e (patch) | |
| tree | 8e82ff62b956179e4b46ffa08cd9129b0d0d03c3 | |
| parent | 103f284e7ffba7fa532ed200ca1adb781d0c955e (diff) | |
Reword to british english style
| -rw-r--r-- | CNAME | 1 | ||||
| -rw-r--r-- | gemfeed/2010-04-09-standard-ml-and-haskell.md | 12 | ||||
| -rw-r--r-- | gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md | 6 | ||||
| -rw-r--r-- | gemfeed/2010-05-09-the-fype-programming-language.md | 52 | ||||
| -rw-r--r-- | gemfeed/2011-05-07-perl-daemon-service-framework.md | 22 | ||||
| -rw-r--r-- | gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md | 14 | ||||
| -rw-r--r-- | gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md | 8 | ||||
| -rw-r--r-- | gemfeed/2016-04-03-offsite-backup-with-zfs.md | 14 |
8 files changed, 64 insertions, 65 deletions
@@ -1 +0,0 @@ -alt.buetow.org
\ No newline at end of file diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.md b/gemfeed/2010-04-09-standard-ml-and-haskell.md index 5b9b38d8..90212b66 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.md +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.md @@ -2,13 +2,13 @@ > Written by Paul Buetow 2010-04-09 -I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already know a little Haskell, could I do not help myself and I implemented the same exercises in Haskell too. +I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already knew a little Haskell, I could not help myself, and I also implemented the same exercises in Haskell. -As you will see, SML and Haskell are very similar (at least when it comes to the basics). However, the syntax of Haskell is a bit more "advanced". Haskell utilizes fewer keywords (e.g. no val, end, fun, fn ...). Haskell also allows to explicitly write down the function types. What I have been missing in SML so far is the so-called pattern guards. Although this is a very superficial comparison for now, so far I like Haskell more than SML. Nevertheless, I thought it would be fun to demonstrate a few simple functions of both languages to show off the similarities. +As you will see, SML and Haskell are very similar (at least when it comes to the basics). However, the syntax of Haskell is a bit more "advanced". Haskell utilizes fewer keywords (e.g. no val, end, fun, fn ...). Haskell also allows to write down the function types explicitly. What I have been missing in SML so far is the so-called pattern guards. Although this is a very superficial comparison for now, so far, I like Haskell more than SML. Nevertheless, I thought it would be fun to demonstrate a few simple functions of both languages to show off the similarities. -Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages but here are a few functions implemented in both, SML and Haskell: +Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages, but here are a few functions implemented in both SML and Haskell: -## Defining a multi data type +## Defining a multi-data type Standard ML: @@ -151,9 +151,9 @@ delete_one m w = do delete_one’ x = (x, False) ``` -## Higher order functions +## Higher-order functions -The first line is always the SML code, the second line always the Haskell variant: +The first line is always the SML code, the second line the Haskell variant: ``` fun make_map_fn f1 = fn (x,y) => f1 x :: y diff --git a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md index b9007956..a0bb35cf 100644 --- a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md +++ b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.md @@ -15,13 +15,13 @@ > Written by Paul Buetow 2010-05-07 -In contrast to Haskell, Standard SML does not use lazy evaluation by default, but eager evaluation. +In contrast to Haskell, Standard SML does not use lazy evaluation by default but an eager evaluation. [https://en.wikipedia.org/wiki/Eager_evaluation](https://en.wikipedia.org/wiki/Eager_evaluation) [https://en.wikipedia.org/wiki/Lazy_evaluation](https://en.wikipedia.org/wiki/Lazy_evaluation) -You can solve certain problems with lazy evaluation easier than with eager evaluation. For example, you might want to list the number Pi or another infinite list of something. With the help of lazy evaluation each element of the list is calculated when it is accessed first, but not earlier. +You can solve specific problems with lazy evaluation easier than with eager evaluation. For example, you might want to list the number Pi or another infinite list of something. With the help of lazy evaluation, each element of the list is calculated when it is accessed first, but not earlier. ## Emulating lazy evaluation in SML @@ -71,7 +71,7 @@ val test = first 10 (nat_pairs_not_null ()); ## Real laziness with Haskell -As Haskell already uses lazy evaluation by default, there is no need to construct a new data type. Lists in Haskell are lazy by default. You will notice that the code is also much shorter and easier to understand than the SML version because of that. +As Haskell already uses lazy evaluation by default, there is no need to construct a new data type. Lists in Haskell are lazy by default. You will notice that the code is also much shorter and easier to understand than the SML version. ``` {- Just to make it look like the ML example -} diff --git a/gemfeed/2010-05-09-the-fype-programming-language.md b/gemfeed/2010-05-09-the-fype-programming-language.md index 05844b4d..db39307f 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.md +++ b/gemfeed/2010-05-09-the-fype-programming-language.md @@ -11,17 +11,17 @@ > Written by Paul Buetow 2010-05-09, last updated 2021-05-05 -Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. To be honest, besides learning and fun there is really no other use case of why Fype actually exists as many other programming languages are much faster and more powerful. +Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. Besides learning and fun, there is no other use case of why Fype exists as many other programming languages are much faster and more powerful. -The Fype syntax is very simple and is using a maximum look ahead of 1 and a very easy top down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means, that syntax errors are only detected during program runtime. +The Fype syntax is straightforward and uses a maximum look ahead of 1 and an effortless top-down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means that syntax errors are only detected during program runtime. -Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say "It's not a hype - it's Fype!". +Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say, "It's not a hype - it's Fype!". -## Object oriented C style +## Object-oriented C style -The Fype interpreter is written in an object oriented style of C. Each "main component" has its own .h and .c file. There is a struct type for each (most components at least) component which can be initialized using a "COMPONENT_new" function and destroyed using a "COMPONENT_delete" function. Method calls follow the same schema, e.g. "COMPONENT_METHODNAME". There is no such as class inheritance and polymorphism involved. +The Fype interpreter is written in an object-oriented style of C. Each "main component" has its own .h and .c file. There is a struct type for each (most components at least) component, which can be initialized using a "COMPONENT_new" function and destroyed using a "COMPONENT_delete" function. Method calls follow the same schema, e.g. "COMPONENT_METHODNAME". There is no such as class inheritance and polymorphism involved. -To give you an idea how it works here as an example is a snippet from the main Fype "class header": +To give you an idea of how it works here as an example is a snippet from the main Fype "class header": ``` typedef struct { @@ -32,7 +32,7 @@ typedef struct { } Fype; ``` -And here is a snippet from the main Fype "class implementation": +And here is a snippet from the primary Fype "class implementation": ``` Fype* @@ -86,14 +86,14 @@ fype_run(int i_argc, char **pc_argv) { ## Data types -Fype uses auto type conversion. However, if you want to know what's going on you may take a look at the following basic data types: +Fype uses auto type conversion. However, if you want to know what's going on, you may take a look at the following basic data types: * integer - Specifies a number -* double - Specifies a double precision number +* double - Specifies a double-precision number * string - Specifies a string * number - May be an integer or a double number * any- May be any type above * void - No type -* identifier - It's a variable name or a procedure name or a function name +* identifier - It's a variable name or a procedure name, or a function name There is no boolean type, but we can use the integer values 0 for false and 1 for true. There is support for explicit type casting too. @@ -101,11 +101,11 @@ There is no boolean type, but we can use the integer values 0 for false and 1 fo ### Comments -Text from a # character until the end of the current line is considered being a comment. Multi line comments may start with an #* and with a *# anywhere. Exceptions are if those signs are inside of strings. +Text from a # character until the end of the current line is considered being a comment. Multi-line comments may start with an #* and with a *# anywhere. Exceptions are if those signs are inside of strings. ### Variables -Variables can be defined with the "my" keyword (inspired by Perl :-). If you don't assign a value during declaration, then it's using the default integer value 0. Variables may be changed during program runtime. Variables may be deleted using the "undef" keyword! Example: +Variables are defined with the "my" keyword (inspired by Perl :-). If you don't assign a value during declaration, it uses the default integer value 0. Variables may be changed during program runtime. Variables may be deleted using the "undef" keyword! Example: ``` my foo = 1 + 2; @@ -136,7 +136,7 @@ if defined foo { ### Synonyms -Each variable can have as many synonyms as wished. A synonym is another name to access the content of a specific variable. Here is an example of how to use is: +Each variable can have as many synonyms as wished. A synonym is another name to access the content of a specific variable. Here is an example of how to use it: ``` my foo = "foo"; @@ -147,7 +147,7 @@ foo = "bar"; assert "bar" == bar; ``` -Synonyms can be used for all kind of identifiers. It's not limited to normal variables but can be also used for function and procedure names etc (more about functions and procedures later). +Synonyms can be used for all kind of identifiers. It's not limited to standard variables but can also be used for function and procedure names (more about functions and procedures later). ``` # Create a new procedure baz @@ -188,7 +188,7 @@ exit foo - bar; ### Parenthesis -All parenthesis for function arguments are optional. They help to make the code better readable. They also help to force precedence of expressions. +All parenthesis for function arguments is optional. They help to make the code better readable. They also help to force the precedence of expressions. ### Basic expressions @@ -230,7 +230,7 @@ Any "any" value holding a string will be automatically converted to an integer v (integer) no <integer> ``` -... returns 1 if the argument is 0, otherwise it will return 0! If no argument is given, then 0 is returned! +... returns 1 if the argument is 0; otherwise, it will return 0! If no argument is given, then 0 is returned! ``` (integer) yes <integer> @@ -273,7 +273,7 @@ until <expression> { <statements> } ## Scopes -A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopes. The "scope" function prints out all available symbols at the current scope. Here is a small example: +A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopes. The "scope" function prints out all available symbols at the current scope. Here is a small example: ``` my foo = 1; @@ -356,7 +356,7 @@ These are some system and interpreter specific built-in functions supported: (integer) fork ``` -... forks a subprocess. It returns 0 for the child process and the pid of the child process otherwise! Example: +... forks a subprocess. It returns 0 for the child process and the PID of the child process otherwise! Example: ``` my pid = fork; @@ -373,10 +373,10 @@ if pid { To execute the garbage collector do: ``` -(integer) gc +(integer) GC ``` -It returns the number of items freed! You may wonder why most of the time it will return a value of 0! Fype tries to free not needed memory ASAP. This may change in future versions in order to gain faster execution speed! +It returns the number of items freed! You may wonder why most of the time, it will produce a value of 0! Fype tries to free not needed memory ASAP. This may change in future versions to gain faster execution speed! ### I/O @@ -396,7 +396,7 @@ is the same as put, but also includes an ending newline. (void) ln ``` -... just prints a newline. +... just prints a new line. ## Procedures and functions @@ -418,7 +418,7 @@ say c; # Print out "6\n"; ### Nested procedures -It's possible to define procedures inside of procedures. Since procedures don't have its own scope, nested procedures will be available to the current scope as soon as the main procedure has run the first time. You may use the "defined" keyword in order to check if a procedure has been defined or not. +It's possible to define procedures inside of procedures. Since procedures don't have their own scope, nested procedures will be available to the current scope as soon as the main procedure has run the first time. You may use the "defined" keyword to check if a procedure has been defined or not. ``` proc foo { @@ -452,12 +452,12 @@ func foo { my a = 2, b = 4; foo; # Run the procedure. Print out "11\n" -say c; # Will produce an error, because c is out of scoped! +say c; # Will produce an error because c is out of scope! ``` ### Nested functions -Nested functions work the same way the nested procedures work, with the exception that nested functions will not be available anymore after the function has been left! +Nested functions work the same way the nested procedures work, except that nested functions will not be available anymore after the function has been left! ``` func foo { @@ -469,12 +469,12 @@ func foo { } foo; -bar; # Will produce an error, because bar is out of scope! +bar; # Will produce an error because bar is out of scope! ``` ## Arrays -Some progress on arrays has been made too. The following example creates a multi dimensional array "foo". Its first element is the return value of the func which is "bar". The fourth value is a string ”3” converted to a double number. The last element is an anonymous array which itself contains another anonymous array as its last element: +Some progress on arrays has been made too. The following example creates a multidimensional array "foo". Its first element is the return value of the func which is "bar". The fourth value is a string" 3" converted to a double number. The last element is an anonymous array which itself contains another anonymous array as its final element: ``` func bar { say ”bar” } diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.md b/gemfeed/2011-05-07-perl-daemon-service-framework.md index e47f407c..823f55c1 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.md +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.md @@ -9,7 +9,7 @@ > Written by Paul Buetow 2011-05-07, last updated 2021-05-07 -PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. In order to do something useful, a module (written in Perl) must be provided. +PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. To do something useful, a module (written in Perl) must be provided. ## Features @@ -17,12 +17,12 @@ PerlDaemon supports: * Automatic daemonizing * Logging -* logrotation (via SIGHUP) +* log rotation (via SIGHUP) * Clean shutdown support (SIGTERM) * Pid file support (incl. check on startup) * Easy to configure * Easy to extend -* Multi instance support (just use a different directory for each instance). +* Multi-instance support (just use a different directory for each instance). ## Quick Guide @@ -37,11 +37,11 @@ PerlDaemon supports: ./bin/perldaemon start daemon.daemonize=no (or shortcut ./control foreground) ``` -To stop a daemon running in foreground mode "Ctrl+C" must be hit. To see more available startup options run "./control" without any argument. +To stop a daemon from running in foreground mode, "Ctrl+C" must be hit. To see more available startup options run "./control" without any argument. ## How to configure -The daemon instance can be configured in "./conf/perldaemon.conf". If you want to change a property only once, it is also possible to specify it on command line (that then will take precedence over the config file). All available config properties can be viewed via "./control keys": +The daemon instance can be configured in "./conf/perldaemon.conf". If you want to change a property only once, it is also possible to specify it on the command line (which will take precedence over the config file). All available config properties can be displayed via "./control keys": ``` pb@titania:~/svn/utils/perldaemon/trunk$ ./control keys @@ -60,10 +60,10 @@ daemon.daemonize=yes # Path to the pidfile daemon.pidfile=./run/perldaemon.pid -# Each module should run every runinterval seconds +# Each module should run every run interval seconds daemon.modules.runinterval=3 -# Path to the alive file (is touched every loopinterval seconds, usable to monitor) +# Path to the alive file (is touched every loop interval seconds, usable for monitoring) daemon.alivefile=./run/perldaemon.alive # Specifies the working directory @@ -88,7 +88,7 @@ $ ./control stop Stopping daemon now... ``` -If you want to change that property forever either edit perldaemon.conf or do this: +If you want to change that property forever, either edit perldaemon.conf or do this: ``` $ ./control keys daemon.loopinterval=10 > new.conf; mv new.conf conf/perldaemon.conf @@ -96,13 +96,13 @@ $ ./control keys daemon.loopinterval=10 > new.conf; mv new.conf conf/perldaemon. ## HiRes event loop -PerlDaemon uses `Time::HiRes` to make sure that all the events run in correct intervals. Each loop run a time carry value is recorded and added to the next loop run in order to catch up lost time. +PerlDaemon uses `Time::HiRes` to make sure that all the events run incorrect intervals. For each loop run, a time carry value is recorded and added to the next loop run to catch up on lost time. ## Writing your own modules ### Example module -This is one of the example modules you will find in the source code. It should be quite self-explanatory if you know Perl :-). +This is one of the example modules you will find in the source code. It should be pretty self-explanatory if you know Perl :-). ``` package PerlDaemonModules::ExampleModule; @@ -150,7 +150,7 @@ Want to give it some better use? It's just as easy as: Now watch `./log/perldaemon.log` closely. It is a good practice to test your modules in 'foreground mode' (see above how to do that). -BTW: You can install as many modules within the same instance as desired. But they are run in sequential order (in future they can also run in parallel using several threads or processes). +BTW: You can install as many modules within the same instance as desired. But they are run in sequential order (in future, they can also run in parallel using several threads or processes). ## May the source be with you diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md index a422ef1e..8ff8ccc4 100644 --- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md @@ -2,13 +2,13 @@ > Written by Paul Buetow 2014-03-24 -In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it +In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it. [https://en.wikipedia.org/wiki/Polyglot_(computing)](https://en.wikipedia.org/wiki/Polyglot_(computing)) ## The Fibonacci numbers -For fun, I programmed my own Polyglot, which is both, valid Perl and C code. The interesting part about C is, that $ is a valid character to start variable names with: +For fun, I programmed my own Polyglot, which is both valid Perl and C code. The exciting part about C is that $ is a valid character to start variable names with: ``` #include <stdio.h> @@ -22,7 +22,7 @@ my $arg; sub hello() { printf("Hello, welcome to Perl-C!\n"); - printf("This program is both, valid C and Perl code!\n"); + printf("This program is both valid C and Perl code!\n"); printf("It calculates all fibonacci numbers from 0 to 9!\n\n"); return 0; } @@ -55,7 +55,7 @@ BEGIN { } ``` -You can find the whole source code at GitHub: +You can find the full source code at GitHub: [https://github.com/snonux/perl-c-fibonacci](https://github.com/snonux/perl-c-fibonacci) @@ -64,7 +64,7 @@ You can find the whole source code at GitHub: ``` ❯ perl fibonacci.pl.c Hello, welcome to Perl-C! -This program is both, valid C and Perl code! +This program is both valid C and Perl code! It calculates all fibonacci numbers from 0 to 9! fib(0) = 0 @@ -87,7 +87,7 @@ fib(10) = 55 ❯ gcc fibonacci.pl.c -o fibonacci ❯ ./fibonacci Hello, welcome to Perl-C! -This program is both, valid C and Perl code! +This program is both valid C and Perl code! It calculates all fibonacci numbers from 0 to 9! fib(0) = 0 @@ -103,7 +103,7 @@ fib(9) = 34 fib(10) = 55 ``` -It's really fun to play with :-). +It's entertaining to play with :-). E-Mail me your thoughts at comments@mx.buetow.org! diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md index 8277601c..69a6655f 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md @@ -11,13 +11,13 @@ > Written by Paul Buetow 2015-12-05, last updated 2021-05-16 -You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on a LG G3 D855 CyanogenMod 13 (Android 6). First of all you need to have root permissions on your phone and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23). +You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on an LG G3 D855 CyanogenMod 13 (Android 6). First of all, you need to have root permissions on your phone, and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23). [](./2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png) ## Foreword -A couple of years have passed since I last worked on Debroid. At the moment I am using the Termux app on Android, which is less sophisticated than a fully blown Debian installation, but sufficient for my current requirements. The content of this site may be still relevant and it would also work with more recent versions of Debian and Android. I would expect that some minor modifications need to be made though. +A couple of years have passed since I last worked on Debroid. Currently, I am using the Termux app on Android, which is less sophisticated than a fully blown Debian installation but sufficient for my current requirements. The content of this site may be still relevant, and it would also work with more recent versions of Debian and Android. I would expect that some minor modifications need to be made, though. ## Step by step guide @@ -27,7 +27,7 @@ All scripts mentioned here can be found on GitHub at: ### First debootstrap stage -This is to be performed on a Fedora Linux machine (could work on a Debian too, but Fedora is just what I use on my personal Laptop). The following steps prepare an initial Debian base image, which then later can be transferred to the phone. +This is to be performed on a Fedora Linux machine (could work on a Debian too, but Fedora is just what I use on my Laptop). The following steps prepare an initial Debian base image, which can then be transferred to the phone. ```code sudo dnf install debootstrap @@ -164,7 +164,7 @@ exit # Exit adb shell ### Include to Android startup: -I you want to start Debroid automatically every time when your phone starts, then do the following: +If you want to start Debroid automatically whenever your phone starts, then do the following: ``` adb push data/local/userinit.sh /data/local/userinit.sh diff --git a/gemfeed/2016-04-03-offsite-backup-with-zfs.md b/gemfeed/2016-04-03-offsite-backup-with-zfs.md index 8e0fdfcf..2c6477af 100644 --- a/gemfeed/2016-04-03-offsite-backup-with-zfs.md +++ b/gemfeed/2016-04-03-offsite-backup-with-zfs.md @@ -17,25 +17,25 @@ ## Please don't lose all my pictures again! -When it comes to data storage and potential data loss I am a paranoid person. It is not just due to my job but also due to a personal experience I encountered over 10 years ago: A single drive failure and loss of all my data (pictures, music, ....). +When it comes to data storage and potential data loss, I am a paranoid person. It is due to my job and a personal experience I encountered over ten years ago: A single drive failure and loss of all my data (pictures, music, etc.). -A little about my personal infrastructure: I am running my own (mostly FreeBSD based) root servers (across several countries: Two in Germany, one in Canada, one in Bulgaria) which store all my online data (E-Mail and my Git repositories). I am syncing incremental (and encrypted) ZFS snapshots between these servers forth and back so either data could be recovered from the other server. +A little about my personal infrastructure: I am running my own (mostly FreeBSD based) root servers (across several countries: Two in Germany, one in Canada, one in Bulgaria) which store all my online data (E-Mail and my Git repositories). I am syncing incremental (and encrypted) ZFS snapshots between these servers forth and back so either data can be recovered from the other server. ## Local storage box for offline data -Also, I am operating a local server (an HP MicroServer) at home in my apartment. Full snapshots of all ZFS volumes are pulled from the "online" servers to the local server every other week and the incremental ZFS snapshots every day. That local server has a ZFS ZMIRROR with 3 disks configured (local triple redundancy). I keep up to half a year worth of ZFS snapshots of all volumes. That local server also contains all my offline data such as pictures, private documents, videos, books, various other backups, etc. +Also, I am operating a local server (an HP MicroServer) at home in my apartment. Full snapshots of all ZFS volumes are pulled from the "online" servers to the local server every other week and the incremental ZFS snapshots every day. That local server has a ZFS ZMIRROR with three disks configured (local triple redundancy). I keep up to half a year worth of ZFS snapshots of all volumes. That local server also contains all my offline data such as pictures, private documents, videos, books, various other backups, etc. -Once weekly all the data of that local server is copied to two external USB drives as a backup (without the historic snapshots). For simplicity these USB drives are not formatted with ZFS but with good old UFS. This gives me a chance to recover from a (potential) ZFS disaster. ZFS is a complex thing. Sometimes it is good not to trust complex things! +Once weekly, all the local server data is copied to two external USB drives as a backup (without the historic snapshots). For simplicity, these USB drives are not formatted with ZFS but with good old UFS. This gives me a chance to recover from a (potential) ZFS disaster. ZFS is a complex thing. Sometimes it is good not to trust complicated things! ## Storing it at my apartment is not enough -Now I am thinking about an offsite backup of all this local data. The problem is, that all the data remains on a single physical location: My local MicroServer. What happens when the house burns or someone steals my server including the internal disks and the attached USB drives? My first thought was to back up everything to the "cloud". The major issue here is however the limited amount of available upload bandwidth (only 1MBit/s). +Now I am thinking about an offsite backup of all this local data. The problem is that all the data remains on a single physical location: My local MicroServer. What happens when the house burns or my server, including the internal disks and the attached USB drives, gets stolen? My first thought was to back up everything to the "cloud". However, the significant issue here is the limited amount of available upload bandwidth (only 1MBit/s). -The solution is adding another USB drive (2TB) with an encryption container (GELI) and a ZFS pool on it. The GELI encryption requires a secret key and a secret passphrase. I am updating the data to that drive once every 3 months (my calendar is reminding me about it) and afterwards I keep that drive at a secret location outside of my apartment. All the information needed to decrypt (mounting the GELI container) is stored at another (secure) place. Key and passphrase are kept at different places though. Even if someone would know of it, he would not be able to decrypt it as some additional insider knowledge would be required as well. +The solution is adding another USB drive (2TB) with an encryption container (GELI) and a ZFS pool. The GELI encryption requires a secret key and a secret passphrase. I am updating the data to that drive once every three months (my calendar is reminding me about it), and afterwards, I keep that drive at a secret location outside of my apartment. All the information needed to decrypt (mounting the GELI container) is stored at another (secure) place. Key and passphrase are kept at different sites, though. Even if someone knew of it, he would not be able to decrypt it as some additional insider knowledge would be required as well. ## Walking one round less -I am thinking of buying a second 2TB USB drive and to set it up the same way as the first one. So I could alternate the backups. One drive would be at the secret location, and the other drive would be at home. And these drives would swap location after each cycle. This would give some security about the failure of that drive and I would have to go to the secret location only once (swapping the drives) instead of twice (picking that drive up in order to update the data + bringing it back to the secret location). +I am thinking of buying a second 2TB USB drive and setting it up the same way as the first one. So I could alternate the backups. One drive would be at the secret location, and the other drive would be at home. And these drives would swap place after each cycle. This would give some security about the failure of that drive, and I would have to go to the secret location only once (swapping the drives) instead of twice (picking that drive up to update the data + bringing it back to the remote location). E-Mail me your thoughts at comments@mx.buetow.org! |
