Bug #2665

Backup data: can't restore backup from old chians

Added by Giacomo Sanchietti over 7 years ago. Updated over 7 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-backup-data
Target version:v6.5-rc1
Security class: Resolution:
Affected version:v6.5-beta3 NEEDINFO:No

Description

Duplicity will fail when trying to restore a file from a backup set older than the last one.
The problem is caused by the --extra-clean option used in cleanup-data-duplicity.

Step to reproduce the problem:
  • Configure and run a backup for a week
  • After the week, wait for a full backup
  • Try to restore a file from previous week backup
  • The restore will fail

Workaround

Go to duplicity archive directory, dig into the manifest files and find the tar which contains searched data.
Restore the data from full backup using the tar command.

Possible solution

Remove --force --extra-clean options from cleanup-data-duplicity action.

Associated revisions

Revision d73eceb9
Added by Giacomo Sanchietti over 7 years ago

cleanup-data-duplicity: remove extra-clean option. Refs #2665

History

#1 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

#2 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#4 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#5 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-testing:
  • nethserver-backup-data-1.0.8-3.0gitd73eceb9.ns6.noarch.rpm

Test case
Test case is quite hard.
After a week check all old *.sigtar.gz are present inside /var/lib/nethserver/backup/duplicity/<hash> directory.
Try also to list a file from an old backup:

signal-event pre-restore-data
duplicity --archive-dir /var/lib/nethserver/backup/duplicity/  list-current-files file:///mnt/backup/mail --time 8D
signal-event poist-restore-data

#6 Updated by Davide Principi over 7 years ago

  • Assignee set to Davide Principi

#7 Updated by Davide Principi over 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

I've tweaked the system date, by moving the clock in the future. Backups occur at 1:00 AM.

    # date 02260059.50 
[wait for the backup to complete...]
    # date 02270059.50
    # date 02280059.50
    # date 03010059.50
    # date 03020059.50
    # date 03030059.50
    # date 03040059.50
    # date 03050059.50
    # date 03060059.50
    # date 03070059.50
    # ll /var/lib/nethserver/backup/duplicity/ac45c95952a10e99864cd5a749e12947/
total 448
-rw-------. 1 root root   205 Feb 26 01:00 duplicity-full.20140226T010051Z.manifest
-rw-------. 1 root root   205 Mar  2 01:00 duplicity-full.20140302T010005Z.manifest
-rw-------. 1 root root 43794 Feb 26 01:00 duplicity-full-signatures.20140226T010051Z.sigtar.gz
-rw-------. 1 root root 43798 Mar  2 01:00 duplicity-full-signatures.20140302T010005Z.sigtar.gz
-rw-------. 1 root root   218 Feb 27 01:00 duplicity-inc.20140226T010051Z.to.20140227T010028Z.manifest
-rw-------. 1 root root   218 Feb 28 01:00 duplicity-inc.20140227T010028Z.to.20140228T010006Z.manifest
-rw-------. 1 root root   218 Mar  1 01:00 duplicity-inc.20140228T010006Z.to.20140301T010025Z.manifest
-rw-------. 1 root root   218 Mar  3 01:00 duplicity-inc.20140302T010005Z.to.20140303T010034Z.manifest
-rw-------. 1 root root   218 Mar  4 01:00 duplicity-inc.20140303T010034Z.to.20140304T010005Z.manifest
-rw-------. 1 root root   218 Mar  5 01:00 duplicity-inc.20140304T010005Z.to.20140305T010039Z.manifest
-rw-------. 1 root root   218 Mar  6 01:00 duplicity-inc.20140305T010039Z.to.20140306T010014Z.manifest
-rw-------. 1 root root   216 Mar  7 01:00 duplicity-inc.20140306T010014Z.to.20140307T010031Z.manifest
-rw-------. 1 root root 39038 Feb 27 01:00 duplicity-new-signatures.20140226T010051Z.to.20140227T010028Z.sigtar.gz
-rw-------. 1 root root 39037 Feb 28 01:00 duplicity-new-signatures.20140227T010028Z.to.20140228T010006Z.sigtar.gz
-rw-------. 1 root root 39036 Mar  1 01:00 duplicity-new-signatures.20140228T010006Z.to.20140301T010025Z.sigtar.gz
-rw-------. 1 root root 39036 Mar  3 01:00 duplicity-new-signatures.20140302T010005Z.to.20140303T010034Z.sigtar.gz
-rw-------. 1 root root 39042 Mar  4 01:00 duplicity-new-signatures.20140303T010034Z.to.20140304T010005Z.sigtar.gz
-rw-------. 1 root root 39038 Mar  5 01:00 duplicity-new-signatures.20140304T010005Z.to.20140305T010039Z.sigtar.gz
-rw-------. 1 root root 39041 Mar  6 01:00 duplicity-new-signatures.20140305T010039Z.to.20140306T010014Z.sigtar.gz
-rw-------. 1 root root 39153 Mar  7 01:00 duplicity-new-signatures.20140306T010014Z.to.20140307T010031Z.sigtar.gz

#8 Updated by Davide Principi over 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

#9 Updated by Davide Principi over 7 years ago

In nethserver-updates:
nethserver-release-6.5-4.ns6.rc1.noarch.rpm
nethserver-devbox-1.4.0-1.ns6.noarch.rpm
nethserver-backup-data-1.0.9-1.ns6.noarch.rpm
nethserver-base-2.1.0-1.ns6.noarch.rpm
nethserver-directory-2.0.1-1.ns6.noarch.rpm
nethserver-firewall-base-1.1.0-1.ns6.noarch.rpm
nethserver-hosts-1.0.7-1.ns6.noarch.rpm
nethserver-httpd-2.3.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.2.1-1.ns6.noarch.rpm
nethserver-hylafax-1.0.5-1.ns6.noarch.rpm
nethserver-ibays-2.0.3-1.ns6.noarch.rpm
nethserver-lib-2.0.1-1.ns6.noarch.rpm
nethserver-mail-server-1.6.1-1.ns6.noarch.rpm
nethserver-nethgui-1.4.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.2-1.ns6.noarch.rpm
nethserver-nut-1.0.7-1.ns6.noarch.rpm
nethserver-openssh-1.0.5-1.ns6.noarch.rpm
nethserver-roundcubemail-0.0.2-1.ns6.noarch.rpm
nethserver-samba-1.4.2-1.ns6.noarch.rpm
nethserver-shorewall-1.0.4-1.ns6.noarch.rpm
nethserver-sogo-thunderbird-1.1.1-1.ns6.noarch.rpm
nethserver-vpn-1.1.2-1.ns6.noarch.rpm
sogo-frontends-1.3.0-1.ns6.noarch.rpm

Also available in: Atom PDF