Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Questions on my backup strategy

  1. #11
    Join Date
    Apr 2007
    Beans
    2,945
    Distro
    Ubuntu

    Re: Questions on my backup strategy

    Quote Originally Posted by nate5 View Post
    Anyway, in searching for a decent method for local backups, I am leaning towards a simple rsync script, like the one I found on this page.
    I use a similar home brewed approach myself. rsnapshot indeed does something like that, but I did not new of it at the time

    Quote Originally Posted by nate5 View Post
    The question comes with how far back to keep.
    As far, and as frequent as you choose. Recently, I made a script that "cleans" the number of backups, retaining daily backups for the last two weeks, weekly backups for the month, monthly backups for the last year, and a single backup from previous years.

    Quote Originally Posted by nate5 View Post
    I am backing up a lot of old family photos and videos. Most of which will never change, so the dates are very old on them.
    That is only going to mean that the files will not be recopied from the source to the backup. The only concern here is longevity of drive storage. Data may fade on media, and it is good practice to rewrite data occasionally. In addition, the drives will fail and need to be replaced at some time. For practical purposes, having a backup on at least two drives is a minimal safety net for a drive breaking. Prefer to have three copies, and store at least one copy elsewhere.


    Quote Originally Posted by nate5 View Post
    If I set a cron job to delete folders older than 60 days, and it goes to delete that folder from Jun 17th, am I going to lose any backups of all my photos?
    Short answer: decidedly NO (fortunately!).

    That is because how this nice incremental backup system works. For each new backup, an entirely new directory structure is created reflecting your current source.
    • New and changed items compared to the previous backup are copied over;
    • Non-changed files are hard linked to the existing copy in the previous backup. No actual data is being transferred here.


    This way, each and every backup is a single, independent, fully functional regular (i.e. no encoding, etc...) copy of the source directly accessible from your file manager. Unchanged files exist in each of these backups, but are pointing to the same binary data on the disk (i.e., to the same inode): they occupy place only once despite being accessible from different backups. Changed files or new files are copied over to the most recent backup.

    Thus, safely delete any of the backups you want to delete. The remaining backups will remain untouched and continue to contain all files you have put there.

    Quote Originally Posted by nate5 View Post
    So do I need to take a full backup once in a while,...
    No. The only reason to take a full backup once in a while is to "refresh" the data on disk as I explained earlier.

    [/quote] ...and only delete backups older than the oldest full backup?[/quote]
    Any backup is independent - delete and keep any that you want. To "refresh" the data in a space economic way, rsync could be used with extra options to preserve hard links. By default, that option is not included in the "-a" option because it slows the operation significantly down.

  2. #12
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Questions on my backup strategy

    vanadium nailed it. BTW, Back-In-Time does the selected removal of selected backup set structures, just like vanadium does, just with a slightly different schedule. I suppose there is a way to have Back-In-Time follow the exact same schedule. I like vanadium's schedule better.

    The trick for this style of backup is an understanding of hard links. https://en.wikipedia.org/wiki/Hard_link and that they use "reference counts".

  3. #13
    Join Date
    Apr 2014
    Beans
    800

    Re: Questions on my backup strategy

    Got full and older than in the script I wrote

    Code:
    global_backup_func() {    
        # create current backup #
        duplicity \
            --exclude-if-present .nobackup \
            --no-encryption \
            --full-if-older-than 1M \
            "$1" file://"$2" >> "$LOGFILE"
        wait
        echo "#" >> "$LOGFILE"
        # clear old backups #
        duplicity remove-all-but-n-full 4 \
            --force \
            file://"$2" >> "$LOGFILE"
        wait
        echo "#" >> "$LOGFILE"
    }
    Time will tell though.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •