BackupYourSystem/TAR - Community Ubuntu Documentation

Backing Up

To get started, please open up a terminal, in Ubuntu this can be done by Applications Menu -> Accessories -> Terminal. Some directories require root or superuser permissions to read and write (needed for backup), for an explanation on why see FilePermissions. To gain temporary root permission, simply preface any command you want to issue with sudo, as explained in RootSudo.

For this example, we will change directories to root. This is where the backup will be made. This is an arbitrary decision, you should create the backup elsewhere. For instance to a mounted external hard drive, another partition or disk connected internally, even a folder in your home directory could be used. In all cases, ensure the location your saving the archive to has enough space. Simply use the cd command to navigate there.

cd /

The following is an exemplary command of how to archive your system.

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev /

To understand what is going on, we will dissect each part of the command.

  • tar - is the command that creates the archive. It is modified by each letter immediately following, each is explained bellow.

    • c - create a new backup archive.

    • v - verbose mode, tar will print what it's doing to the screen.

    • p - preserves the permissions of the files put in the archive for restoration later.

    • z - compress the backup file with 'gzip' to make it smaller.

    • f <filename> - specifies where to store the backup, backup.tar.gz is the filename used in this example. It will be stored in the current working directory, the one you set when you used the cd command.

  • --exclude=/example/path - The options following this model instruct tar what directories NOT to backup. We don't want to backup everything since some directories aren't very useful to include. The first exclusion rule directs tar not to back itself up, this is important to avoid errors during the operation. After, we proceed to exclude the /proc, /lost+found, /sys, /mnt, /media and /dev directories in root. /proc and /sys are virtual filesystems that provide windows into variables of the running kernel, so you do not want to try and backup or restore them. /dev is a tmpfs whose contents are created and deleted dynamically by udev, so you also do not want to backup or restore it.

    • It is important to note that these exclusions are recursive. This means that all folders located within the one excluded will be ignored as well. In the example, excluding the /media folder excludes all mounted drives and media there.

    • If there are certain partitions you wish to backup located in /media, simply remove the exclusion and write a new one excluding the partitions you don't want backed up stored within it. For example:

      • --exclude=/media/unwanted_partition
  • / - After all options is the directory to backup. Since we want to backup everything on the system we use / for the root directory. Like exclusions, this recursively includes every folder below root not listed in the exclusions or other options.

See tips before operation for additional information.

Once satisfied with the command, execute it and wait until it has completed. The duration of the operation depends on the amount of files and compression choses. Once completed, check the directory you set to find the archive. In our example, backup.tar.gz would be located in the / directory once completed. This archive can then be moved to any other directory for long term storage.

Note: At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something, but in most cases you can just ignore that.

 

Additional Tips

  • To keep good records, you should include the date and a description of backup in the filename.
  • Another option would be to use bzip2 to compress your backup instead of gzip. Bzip2 provides a higher compression ratio at the expense of speed. If compression is important to you, just substitute the z in the command with j, and change the file name to .tar.bz2. The rest of this guides examples use gzip, make the subsequent changes to the examples before using them.

  • If you want to exclude all other mounts other than the current - by this I mean partitions mounted to directories - then use the --one-file-system option appended before the exclusion rules. This has the effect of stopping tar from crossing into any other mounts in any directory including /mnt or /media. For instance, many users create a separate mount for /home to keep user folders separate from root, adding this option to our original example would exclude home's contents entirely.

 

from:
https://help.ubuntu.com/community/BackupYourSystem/

http://web.media.mit.edu/~jorkin/aibooks.html

from http://web.media.mit.edu/~jorkin/aibooks.html:

GAME AI
AI Game Programming Wisdom - Edited by Steve Rabin
AI Game Programming Wisdom 2 - Edited by Steve Rabin
AI Game Programming Wisdom 3 - Edited by Steve Rabin
AI Game Programming Wisdom 4 - Edited by Steve Rabin
Programming Game AI by Example - Mat Buckland
AI Techniques for Game Programming - Mat Buckland
Artificial Intelligence For Computer Games: An Introduction - John Funge
AI for Computer Games and Animation: A Cognitive Modeling Approach - John Funge
AI Game Development: Synthetic Creatures with Learning and Reactive Behaviors - Alex J. Champandard
AI Game Engine Programming - Brian Schwab
Artificial Intelligence for Games - Ian Millington
Behavioral Mathematics for Game AI - Dave Mark
AI for Game Developers - David M. Bourg
Game Programming Gems - Edited by Mark DeLoura
Game Programming Gems 2 - Edited by Mark DeLoura
Game Programming Gems 3 - Edited by Dante Treglia
Game Programming Gems 4 - Edited by Andrew Kirmse
Game Programming Gems 5 - Edited by Kim Pallister
Game Programming Gems 6 - Edited by Mike Dickheiser
Game Programming Gems 7 - Edited by Scott Jacobs
 
 ACADEMIC AI TEXTBOOKS
Artificial Intelligence: A Modern Approach - Stuart Russell and Peter Norvig
Artificial Intelligence: A New Synthesis - Nils J. Nilsson
Artificial Intelligence - Patrick H. Winston
 
 MACHINE LEARNING & DATA MINING
Machine Learning - Thomas Mitchell
Data Mining: Practical Machine Learning Tools and Techniques - Ian H. Witten and Eibe Frank
Pattern Classification - Richard O. Duda, Peter E. Hart, and David G. Stork
 
 COMPILER DESIGN
Compilers: Principles, Techniques, and Tools - Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman
lex & yacc - Doug Brown and Tony Mason
 
 NATURAL LANGUAGE PROCESSING AND GENERATION
Foundations of Statistical Natural Language Processing - Christopher D. Manning and Hinrich Schutze
Speech and Language Processing - Daniel Jurafsky and James H. Martin
Generating Natural Language Under Pragmatic Constraints - Eduard H. Hovy
Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology - Dan Gusfield
 
 MODELS OF THE MIND AND EMOTION
Society of Mind - Marvin Minsky
The Emotion Machine: Commonsense Thinking, Artificial Intelligence, and the Future of the Human Mind - Marvin Minsky
Designing Sociable Robots - Cynthia Breazeal
Commonsense Reasoning - Erik T. Mueller
 
 PLANNING
Automated Planning: Theory & Practice - Malik Ghallab, Dana Nau, and Paolo Traverso
 
 RELATED TEXTBOOKS
Data Structures Using C and C++ - Yedidyah Langsam, Moshe J. Augenstein, and Aaron M. Tenenbaum
Introduction to Probability - Dimitri P. Bertsekas and John N. Tsitsiklis
Introduction to Algorithms - Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein
The Algorithm Design Manual - Steven S. Skiena
Introductory Linear Algebra: An Applied First Course - Bernard Kolman
All the Mathematics You Missed: But Need to Know for Graduate School - Thomas A. Garrity
Computer Vision - Linda G. Shapiro and George C. Stockman
 
 RELATED READING
Creation: Life and How to Make It - Steve Grand
Edison's Eve: A Magical History of the Quest for Mechanical Life - Gaby Wood
Scripts, Plans, Goals, and Understanding: An Inquiry Into Human Knowledge Structures - Roger Schank and Robert Abelson
Intention, Plans, and Practical Reason - Michael E. Bratman
The Intentional Stance - Daniel C. Dennett
Using Language - Herbert H. Clark
The Language Instinct: How the Mind Creates Language - Steven Pinker
Understanding Comics: The Invisible Art - Scott McCloud
The Illusion of Life: Disney Animation - Ollie Johnston and Frank Thomas

Posted July 30, 2009