Re: Keeping backups until storage runs short (deja-dup style) with command line tools?
On Feb 21, 2013, at 3:46 AM, Johannes Graumann wrote: Hi, deja-dup has an option to keep backups forever or until storage on the drive backed up to runs short (at which point it starts deleting old backups). Does someone have any pointers on how to copy that behavior using duplicity and/or other CLI tools? Cheers, Joh Have you looked at the "rsnapshot" package? Rick -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/22a1c6b2-750e-4fb1-a839-46933a4fe...@pobox.com
Re: Keeping backups until storage runs short (deja-dup style) with command line tools?
On Thu, Feb 21, 2013 at 02:46:43PM +0300, Johannes Graumann wrote: > Hi, > > deja-dup has an option to keep backups forever or until storage on the drive > backed up to runs short (at which point it starts deleting old backups). > Does someone have any pointers on how to copy that behavior using duplicity > and/or other CLI tools? In words, if the amount of the previous full backup is less than free space, nuke the oldest full backup, and check again. You could write that in shell/perl/python, using rsync to make the backups. Greetings, Joel > Cheers, Joh > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: http://lists.debian.org/kg51br$br$1...@ger.gmane.org > -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130223083913.GA15825@sprite
Re: Keeping backups until storage runs short (deja-dup style) with command line tools?
On Thu, Feb 21, 2013 at 02:46:43PM +0300, Johannes Graumann wrote: > Hi, > > deja-dup has an option to keep backups forever or until storage on the drive > backed up to runs short (at which point it starts deleting old backups). > Does someone have any pointers on how to copy that behavior using duplicity > and/or other CLI tools? This isn't tested, just typed into mutt, so I might have some syntax errors. #!/bin/bash if [[ ! -d ~/.backup ]]; then mkdir ~/.backup fi FreeSpace=$(df -PB1 ~/.backup|awk 'NR==2 {print $4}') FileSize=$(stat -c='%s' $1) if (( $FileSize >= $FreeSpace )); then # No room to copy file. Clear out oldest file rm $(ls -tr ~/.backup|tail -n 1) fi cp $1 ~/.backup/$1.$(date +'%Y%m%d') - Eliminating race conditions etc are left as an exercise for the reader :) signature.asc Description: Digital signature
Keeping backups until storage runs short (deja-dup style) with command line tools?
Hi, deja-dup has an option to keep backups forever or until storage on the drive backed up to runs short (at which point it starts deleting old backups). Does someone have any pointers on how to copy that behavior using duplicity and/or other CLI tools? Cheers, Joh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/kg51br$br$1...@ger.gmane.org