Re: How to find a deleted file amongst many archives
On Nov 5, 2015, at 5:21 PM, Quinn Comendant wrote: > > It would be pretty easy to create a local index during the backup process and > save all file paths, upload timestamp, and archive names to a text file or > sqlite db. This would make individual file restorations much quicker. Perhaps > there exists a tarsnap wrapper that already has this feature? Here's another starting point for tracking what files are in which tarsnap archives. http://mail.tarsnap.com/tarsnap-users/msg01073.html -- Garance Alistair Drosehn= gadc...@earthlink.net Senior Systems Programmer or g...@freebsd.org
Re: How to find a deleted file amongst many archives
On Nov 5, 2015, at 5:21 PM, Quinn Comendant wrote: > On Thu, 5 Nov 2015 13:36:05 -0800, Colin Percival wrote: >> There's no built-in way to do this. Due to tarsnap's encryption, there's no >> way to "index" the archives, so any built-in command would just do what you >> can do manually anyway; there didn't seem much point. > > That makes sense. > > It would be pretty easy to create a local index during the backup process and > save all file paths, upload timestamp, and archive names to a text file or > sqlite db. This would make individual file restorations much quicker. Perhaps > there exists a tarsnap wrapper that already has this feature? I have one such wrapper partially written, but in it I'm trying to setup some other features which probably don't matter to anyone else. And of course, it's the "other features" which got implemented first, not the index. -- garance
Re: How to find a deleted file amongst many archives
On 11/05/15 14:21, Quinn Comendant wrote: > It would be pretty easy to create a local index during the backup process > and save all file paths, upload timestamp, and archive names to a text file > or sqlite db. This would make individual file restorations much quicker. > Perhaps there exists a tarsnap wrapper that already has this feature? I'm not aware of any, but it's quite possible that someone has done this. There's a lot of wrapper scripts out there. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Re: How to find a deleted file amongst many archives
On Thu, 5 Nov 2015 13:36:05 -0800, Colin Percival wrote: > There's no built-in way to do this. Due to tarsnap's encryption, there's no > way to "index" the archives, so any built-in command would just do what you > can do manually anyway; there didn't seem much point. That makes sense. It would be pretty easy to create a local index during the backup process and save all file paths, upload timestamp, and archive names to a text file or sqlite db. This would make individual file restorations much quicker. Perhaps there exists a tarsnap wrapper that already has this feature? Quinn
Re: How to find a deleted file amongst many archives
On 11/05/15 13:19, Quinn Comendant wrote: > On Thu, 5 Nov 2015 13:01:18 -0500, Quinn Comendant wrote: >> Is there a way to search all archives to find "the most recent file that >> exist(s|ed) at the specified path"? > > Just to avoid anyone giving the obvious answer: I suppose I can always wrap > `while` loops around `tarsnap --list-archives` and `tarsnap -t -f > $ARCHIVENAME` with a combination of `grep $FILENAME` and `tail -1`. You got there before me. Of course, assuming the file disappeared at one point and did not reappear again later, you could do a binary search instead of a linear search here. > Is that the best strategy, or is there a built-in command that does this > more elegantly (there don't appear to be)? There's no built-in way to do this. Due to tarsnap's encryption, there's no way to "index" the archives, so any built-in command would just do what you can do manually anyway; there didn't seem much point. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Re: How to find a deleted file amongst many archives
On Thu, 5 Nov 2015 13:01:18 -0500, Quinn Comendant wrote: > Is there a way to search all archives to find "the most recent file that > exist(s|ed) at the specified path"? Just to avoid anyone giving the obvious answer: I suppose I can always wrap `while` loops around `tarsnap --list-archives` and `tarsnap -t -f $ARCHIVENAME` with a combination of `grep $FILENAME` and `tail -1`. Is that the best strategy, or is there a built-in command that does this more elegantly (there don't appear to be)? Quinn