freezer-agent: timestamped directories don't work as expected

Bug #1594980 reported by Tim Buckley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Invalid
Undecided
Unassigned

Bug Description

When creating backups, freezer-agent places backup data inside a directory corresponding to the timestamp of the _first_ backup of a given name. This doesn't make sense to me.

Steps to reproduce (hostname is 'manager'):

    $ src_a=$(mktemp -d)
    $ src_b=$(mktemp -d)
    $ storage=$(mktemp -d)
    $ touch $src_a/{a,b,c}
    $ touch $src_b/{d,e,f}

The first backup works as expected:

    $ freezer-agent \
        --path-to-backup $src_a \
        --container $storage \
        --backup-name test \
        --storage local \
        --metadata-out $storage/a.json
    $ ls $storage
    a.json manager_test/
    $ ls $storage/manager_test
    1466542080/
    $ ls $storage/manager_test/1466542080
    manager_test_1466542080_0 tar_metadata_manager_test_1466542080_0

The second backup creates metadata as expected but places the actual backup data in the wrong directory:

    $ freezer-agent \
        --path-to-backup $src_b \
        --container $storage \
        --backup-name test \
        --storage local \
        --metadata-out $storage/b.json
    $ ls $storage
    a.json b.json manager_test/
    $ ls $storage/manager_test
    1466542080/
    $ ls $storage/manager_test/1466542080
    manager_test_1466542080_0 manager_test_1466542126_1
    tar_metadata_manager_test_1466542080_0 tar_metadata_manager_test_1466542126_1

Now there's a backup with a mismatched timestamp in the same directory as the first backup, but I'd expect that the backup with timestamp 'xxx126' would be in a directory named 'xxx126'. At first glance it even appears that the second backup failed entirely (though thankfully restore seems resilient to this behavior given `find_all(...)` ignores the timestamp).

My feeling is that we should either a) put each backup in its own directory as expected, b) not put them in a timestamped subdirectory at all, or c) at least document this behavior as-is.

Revision history for this message
Tim Buckley (timothy-jas-buckley) wrote :

It turns out that this is a result of the default incremental backup functionality. Passing '--no-incremental' makes everything work as expected.

Changed in freezer:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.