write a wiki page with theme "DockStar"

DockStar Backup

In order to have a convenient data backup I wanted to have something similar to Time Machine from Apple.

The program Back in time did a good job in the past on my Ubuntu server, so I wanted to use it also on the Dockstar in console mode.

Back in Time Installation

Because "Back in time" is not in the Debian repository, you have to install it from the source code (Python based).

# take care about prerequisites
$ sudo apt-get install rsync make gettext

# unpack the archive
$ tar xzf backintime-1.0.8_src.tar.gz

$ cd backintime-1.0.8/common
# Create Makefile
$ ./configure
# Install the user part of backintime
$ make

# install the root parts of backintime
$ sudo make install

# read the man page
$ man backintime

Back in Time use

Only user data and configuration data are saved (/etc, /home and /var).

$ du -BK /etc
2108K   /etc

$ du -BK /home
158292K /home

$ du -BK /var
233268K /var

# The configuration file is in either:
~/.config/backintime/config
or
/root/.config/backintime/config

root crontab

# show root crontab table
$ sudo crontab -e
#Back In Time system entry, this will be edited by the GUI:
#m h d m wd
0 0 * * * nice -n 19 ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1

# explanations
  0 0            : at midnight
  nice -n 19     : lowest priority
  ionice -c2 -n7 : class "best effort", low priority

  --backup-job
    take a snapshot (if needed) depending on schedule rules (used for cron jobs)

  >/dev/null     : no output
  2>&1           : error output mapped to output

config file

The settings were:

General:
    Where to save snapshots: /media/SAVE
    Shedule: every day, 00:00

Include:
    /etc
    /home
    /var

Excludes:
    .gvfs
    .cache*
    .thumbnails*
    .trash*
    *backup*
    ~*
    /root/UbuntuOne
    .dropbox*

Auto-remove:
    older than: 10 years
    if free space is less than: 1 GB
    smart remove:
        keep all snapshots for at least: 2 days
        keep one snapshot per day for at least: 7 days
        keep one snapshot per week for at least: 4 weeks
        keep one snapshot per month for at least: 24 month
        keep one snapshot per year for all years
    Don't remove named snapshots

Options:
    Enable notification
    Backup files on restore
    Log level: All

Expert options:
    Run 'nice' as cron job
    Run 'ionice' as cron job 

This is the produced config file.

$ cat /root/.config/backintime/config
gnome.last_path=/root
gnome.main_window.height=532
gnome.main_window.hpaned1=200
gnome.main_window.hpaned2=200
gnome.main_window.width=782
gnome.main_window.x=121
gnome.main_window.y=34
gnome.show_hidden_files=false
#
#0-manual,10-hourly,20-daily,30-weekly,40-monthly
profile1.snapshots.automatic_backup_mode=20
profile1.snapshots.automatic_backup_time=0
profile1.snapshots.backup_on_restore.enabled=true
profile1.snapshots.continue_on_errors=false
profile1.snapshots.copy_links=false
profile1.snapshots.copy_unsafe_links=false
profile1.snapshots.cron.ionice=true
profile1.snapshots.cron.nice=true
profile1.snapshots.dont_remove_named_snapshots=true
profile1.snapshots.exclude.1.value=.gvfs
profile1.snapshots.exclude.2.value=.cache*
profile1.snapshots.exclude.3.value=[Cc]ache*
profile1.snapshots.exclude.4.value=.thumbnails*
profile1.snapshots.exclude.5.value=[Tt]rash*
profile1.snapshots.exclude.6.value=*.backup*
profile1.snapshots.exclude.7.value=*~
profile1.snapshots.exclude.8.value=/root/Ubuntu One
profile1.snapshots.exclude.9.value=.dropbox*
profile1.snapshots.exclude.size=9
profile1.snapshots.include.1.type=0
profile1.snapshots.include.1.value=/etc
profile1.snapshots.include.2.type=0
profile1.snapshots.include.2.value=/home
profile1.snapshots.include.3.type=0
profile1.snapshots.include.3.value=/var
profile1.snapshots.include.size=3
profile1.snapshots.log_level=3
profile1.snapshots.min_free_space.enabled=true
# 10=Mb, 20=Gb
profile1.snapshots.min_free_space.unit=20
profile1.snapshots.min_free_space.value=1
profile1.snapshots.no_on_battery=false
profile1.snapshots.notify.enabled=true
profile1.snapshots.path=/media/SAVE
profile1.snapshots.path.auto=true
profile1.snapshots.path.host=rudiswiki.de
profile1.snapshots.path.profile=1
profile1.snapshots.path.user=root
profile1.snapshots.preserve_acl=false
profile1.snapshots.preserve_xattr=false
profile1.snapshots.remove_old_snapshots.enabled=true
# 20=days,30=weeks,80=years
profile1.snapshots.remove_old_snapshots.unit=80
profile1.snapshots.remove_old_snapshots.value=10
profile1.snapshots.smart_remove=true
profile1.snapshots.smart_remove.keep_all=2
profile1.snapshots.smart_remove.keep_one_per_day=7
profile1.snapshots.smart_remove.keep_one_per_month=24
profile1.snapshots.smart_remove.keep_one_per_week=4
profile1.snapshots.use_checksum=false
profile1.snapshots.user_backup.ionice=false
profiles.version=1

List of pages in this category:

-- RudolfReuter 2013-01-30 19:03:41


Go back to CategoryDockStar or FrontPage ; KontaktEmail (ContactEmail)