Skip to content

Commit

Permalink
Sort the backup times before deleting snapshots to be sure the time o…
Browse files Browse the repository at this point in the history
…rder is correct between the timing of the first snapshot of the month and the timing of the snapshot from four weeks ago.
  • Loading branch information
walsh159 committed Mar 25, 2011
1 parent c3ec2ae commit fccd010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boto/ec2/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,8 @@ def trim_snapshots(self, hourly_backups = 8, daily_backups = 7, weekly_backups =
temp.append(t)

target_backup_times = temp
target_backup_times.reverse() # make the oldest date first
target_backup_times.sort() # make the oldeest dates first, and make sure the month start and last four week's
# start are in the proper order

# get all the snapshots, sort them by date and time, and organize them into one array for each volume:
all_snapshots = self.get_all_snapshots(owner = 'self')
Expand Down

0 comments on commit fccd010

Please sign in to comment.