user2003024
user2003024

Reputation: 191

Duplicity - can't restore single file

I try to restore single file or dir by duplicity from amazon s3, but but I get an errors.

Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1251, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1244, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1198, in main
    restore(col_stats)
  File "/usr/bin/duplicity", line 538, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/bin/duplicity", line 560, in restore_get_patched_rop_iter
    backup_chain = col_stats.get_backup_chain_at_time(time)
  File "/usr/lib/python2.6/dist-packages/duplicity/collections.py", line 934, in get_backup_chain_at_time
    raise CollectionsError("No backup chains found")
CollectionsError: No backup chains found

What I do wrong?

Here how I doing backups export PASSPHRASE=**** export AWS_ACCESS_KEY_ID=**** export AWS_SECRET_ACCESS_KEY=**** GPG_KEY=**** BACKUP_SIM_RUN=1

LOGFILE="/var/log/s3-backup.log"
DAILYLOGFILE="/var/log/s3-backup-daily.log"

# The source of your backup
SOURCE=/home/u54433

# The destination
DEST=s3+http://**********


trace () {
        stamp=`date +%Y-%m-%d_%H:%M:%S`
        echo "$stamp: $*" >> ${DAILYLOGFILE}
}

cat /dev/null > ${DAILYLOGFILE}

trace "removing old backups..."
duplicity remove-older-than 2M --force --sign-key=${GPG_KEY} ${DEST} >> ${DAILYLOGFILE} 2>&1

trace "start backup files..."
duplicity --sign-key=${GPG_KEY} --exclude="**/logs" --s3-european-buckets --s3-use-new-style ${SOURCE} ${DEST} >> ${DAILYLOGFILE} 2>&1

cat "$DAILYLOGFILE" >> $LOGFILE

export PASSPHRASE=
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

Upvotes: 0

Views: 1908

Answers (3)

Astockwell
Astockwell

Reputation: 1536

For anyone coming back to this question looking for a definitive answer, @shaikh-systems link leads to the realization that there is some issue in Duplicity/AWS communication of IAM sub-account keys. To restore, I got it to work by using/exporting my primary account key/secret. I'm using duplicity 0.6.21.

Upvotes: 0

Rafal
Rafal

Reputation: 21

Use --s3-use-new-style option in all duplicity calls.

I had the same problem as you did. I added the missing option to "duplicity remove-older-than" and everything works great now.

Upvotes: 2

Shaikh Systems
Shaikh Systems

Reputation: 21

It is better to remove the S3 bucket form amazon and try to recreate full backup this might resolve the issue.

Also

You can see the below link

https://answers.launchpad.net/duplicity/+question/107074

Upvotes: 0

Related Questions