SimpleBackupSolution

Status

Introduction

A Simple Backup Solution for Ubuntu should comprise of snapshot functionality – to restore to the last known good configuration of a single file, directory or a directory tree.

Rationale

User expects from their favorite OS the possibility to perform some sane and simple backups of their system.

Scope and Use Cases

Implementation Plan

Note: incremental here means 'backup all files that have been changed (mtime) since the last backup'. diffs are not involved, as that would create a lot of complication for remote backup and lots of disc usage for the local ones.

Timeline

Functional modules

Backed worker was quite complicated and required creation of a block scheme and a definition of an internal data structure: backup definition tree.

Command line restore utility was quite trivial - no further detalisation. Note: It should be written so that it is usable as a module by GUI restore utility.

Administrator and user backup configuration caplets give me a bit of trouble with the creation of all neccessery UI elements in Glade. "Backup now" button is here (with a progress bar). There is much functional similarty similarity between these caplets and that lets me belive that a merge is possible here.

The GUI restore utility is mostly trivial, except for the need to give an ability to select multiple files/directories where these directories might or might not exist in the current directory tree. It seams that use of a generic tree structure will be required here.

Format of the backup target directory

/var/backup - base directory

/var/backup/.tree.cache - cache of the file structure of all backups (updated by cron jobs after all regular backups)

/var/backup/20050723.172354.aigarhome.ful/ - a full backup snapshot from 23rd July 2005

/var/backup/20050723.172354.aigarhome.ful/ver - backup directory version information (default - 1). mtime of this file is the definitive start time of the backup.

/var/backup/20050723.172354.aigarhome.ful/packages - dump of 'dpkg --get-selections'

/var/backup/20050723.172354.aigarhome.ful/tree - file structure of this backup (includes name, size, permission and mtime information)

/var/backup/20050723.172354.aigarhome.ful/excludes - structure describing all excluded files (paths, regexes, maxsize)

/var/backup/20050723.172354.aigarhome.ful/files/home/aigarius/soc/simple_backup_spec.txt.gz - recreation of the filesystem structure for the backuped files. all files are .gz'ipped individually. permissions, ctime, mtime and atime are maintained. symlinks are copied as such.

/var/backup/20050723.172354.aigarhome.ful/files.tar - if target filesystem cann't maintain UNIX file information, .tar of the files/ subdirectory is to be used. This is a security risk as all users can get any file from this, so this must be used *only* when filesystem does not enforce proper permission control anyway.

/var/backup/20050723.172354.aigarhome.ful/stats - statistics

/var/backup/20050724.070502.aigarhome.inc/ - an incremental snapshot from 24th July 2005

/var/backup/20050724.070502.aigarhome.inc/ver - same as above

/var/backup/20050724.070502.aigarhome.inc/base - symlink to the previose (base) directory. can be *.ful/ or *.inc/

/var/backup/20050724.070502.aigarhome.inc/packages.patch - 'diff -u' of the packages list

/var/backup/20050724.070502.aigarhome.inc/tree - describes added and changed files.

/var/backup/20050724.070502.aigarhome.inc/removed - list of removed files

/var/backup/20050724.070502.aigarhome.inc/excludes - same as above

/var/backup/20050724.070502.aigarhome.inc/files/* - same as above

/var/backup/20050724.070502.aigarhome.inc/files.tar - same as above

/var/backup/20050724.070502.aigarhome.inc/stats - same as above

Sequence of a backup run

do_backup()

Notes:

Automatic full/incremental backuping

The backup process will decide whether to do a full or an incremental backup basing only on contents of the target backup directory and maxincrement configuration option. This will work like this:

Data Preservation and Migration

None

Packages Affected

None

User Interface Requirements

Outstanding Issues

UDU BOF Agenda

UDU Pre-Work

UbuntuDownUnder/BOFs/SimpleBackupSolution (last edited 2008-08-06 16:32:56 by localhost)