You are not logged in.

#1 2010-12-21 09:54:57

whoops
Member
Registered: 2009-03-19
Posts: 891

Random increment combining for simple backup?

Random folder combining for simple incremental backup - good or bad?

At the moment my backup "script" looks like this:

sudo mount /media/BACKUP
sudo rsync -avb --delete --backup --force --ignore-errors \
   /var /home /etc /boot /root /media/BACKUP/recent \
   --backup-dir=/media/BACKUP/$(date +%F) \
   --log-file=/media/BACKUP/logs/$(date +%F_%T).log \
   --exclude-from '/home/user/scripts/backup.exclude'
sudo umount /media/BACKUP

Now I'm thinking of - with a random chance of 3:1 or something - combining a random folder with the next stage every time it creates a new directory / backup increment. This, with time, should automatically lead to older folder being less probable to contain many stages of the same files and thus older backups taking up less space when it comes to files that often change... while the total amount of backups I'll have and the amount of increments should still be growing at at least one third the rate, there should be a theoretical point where the total file size should stay almost the same with almost no manual trimming needed, because with time there will be more big folders and a bigger chance that many files get overwritten at once... or something? Not exactly but almost...?

Something like...

if [number of directories after backup] > [directories before backup]
  if [random(1..3) > 1]
    mv [random directory] [next younger directory]

I'm still really slow at writing small bash scripts, so before I waste a lot of time:
Is this a bad idea? Did I miss some important aspect?
Does someone use something like this?


Thanks!

Last edited by whoops (2010-12-21 09:56:59)

Offline

#2 2010-12-21 12:36:21

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Random increment combining for simple backup?

What. sad
Use GIT.

Offline

#3 2010-12-21 14:49:43

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Random increment combining for simple backup?

use rsnapshot and a filesystem that supports hardlinking.

Offline

#4 2010-12-21 14:55:59

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Random increment combining for simple backup?

Have you tried rdiff-backup

Offline

Board footer

Powered by FluxBB