Showing posts with label Backup. Show all posts
Showing posts with label Backup. Show all posts

Wednesday, March 6, 2013

Rpi Backup

My Rpi is working very well (as shown on previous post). My many years of Admin'ing UNIX systems is paying off.

I have spent several hours / days configuring the system, building a web page, and playing with use ideas. I do NOT want to lose any of my efforts due to a dumb mistake or system crash - so a backup is needed.

Several backup strategies are suggested in the web forums, the most often mentioned method is; shutting down the Rpi system, and cloning the SD card. Which I think is a good idea - but maybe only once in a while. The size of my 16GB SD card and system interruption precludes doing this very often.

Most of the Rpi system is easily re-built from the original image, and most (if not all) other system additions are obtained from online software depots.

After building (cloning) the original SD image, and like most Rpi users, I expanded the file system size to fill the rest of the SD card. And then executed the following:


sudo aptitude update
sudo adduser --system <my-desired-user-name>


And, of course, I had to install "fldigi" for a potential radio connection.


sudo aptitude fldigi



Now, . . . I really do not need a full backup, just the backup important stuff. A very clever backup command is "rsync", which I have used many times on very large systems. Rsync can be installed as:


sudo aptitude install rsync


With the following rsync command,  I can backup a few important directories to another remote linux system, in this case a system called "shilo", from the local (Rpi) system is called "magpi". The directories that I want to backup are: "etc", "boot", "home", "root", and "var/spool/cron".


(
  cd / &&
  rsync -avzR --delete etc boot home root var/spool/cron  shilo:/Backup/magpi/SnapShot01
)


The nice thing about "rsync" is that the backup files are easily accessed via "scp" or directly on the remote machine. Also, re-executing the same command, will only transfer the files that have been changed. See the rsync manual page.

--

Friday, May 28, 2010

System Backup

This a Ubuntu Post, Ignore it you do not use a UNIX like OS.

I know this is not exactly HAM Radio, but it does support my interest in the Hobby, both for Homebrew Project Creation and Radio Operations.

I have worked with the UNIX OS for about 30+ years, and have used many "Backup Utilities", everything from system level simple "tar", "cpio" to full DataBase supported systems. All of these methods are lacking, and NONE of them have what I would call the "Right Stuff". Over the years, I have written many custom backup systems for myself and customers, to support the following.

A Backup System should be; "easy to set up", "easy use", and "easy to RESTORE". The Backup System should be able to be used by the System Administrator for full system backup, and/or by a normal "user" for personal files.

The Backup System should provide;
  • local storage, to same disk and/or to another partition
  • local storage, to another disk
  • remote storage to another system's storage
  • remote (out of house) system storage
  • easy access to that associationally needed file restore, directly from online
  • delta backups should be supported and automatic
  • multiple revisions with date stamps
  • it should be fast as the path allows
I believe "tape storage" is worthless, nobody has the time to wait for multiple 100's of G Bytes for tape to RESTORE (remember, for me, time to RESTORE is a measure of the worth of a Backup System, disk are cheap, use them!).

I believe; "An untested backup and the resulting RESTORE, is no backup at all".

Up until now, for my personal use,  I have preferred my own "Backup Utilities" , they have had all of the above qualities.

But, Today I found, what I think, is the ideal UNIX Backup Utility - "backintime" from "http://backintime.le-web.org".

It does everything I needed of a Backup System, and it is simple to use!  - Thanks Guys!

BackInTime provides a very nice, easy to use GUI. Under the hood, "backintime" uses "rsync" with all of its capabilities and speed.

If you want to use it with your Linux system, check for it in your "software repositories" first to see if it is available, that way it will be updated with normal system updates, otherwise download from the above site.

I recommend, to always plan for a second local disk and/or another system for the "Backup Storage Target". If your single local disk with the only backup (on the same disk) fails, you-are-hosed! Avoid the problem - have multiple disk or systems. Remember, it is not a matter of IF the disk or system fails, but only a matter of  WHEN.

Note: For remote backup storage access, "sshfs" is your friend (which should also be available in your software repository).


From now on, my Shack/Hanger/Shop (plus boathouse) will now be Backed Up with "BackInTime"!


UPDATE:

Well "backintime" got is almost right, or at least as high as 98%.  A backup to a remote mounted files systems does not appear to utilize hard links for each successive backup - and therefore each requires the same amount of space as the original.  I my have this wrong (I hope so), but so far I have not be able to confirm or deny this with online documentation.  I am still checking for more information.

--