torekp Posted August 29, 2007 Report Share Posted August 29, 2007 Say you've got some file that you keep changing over and over. You want to save some backup copies but there's no need to save every single one for all eternity. Maybe you want to keep everything less than a week old, then keep another from a month or so ago, then another from 6 months, then another from a year or so ago - for instance. Or maybe something else. What other ways of managing the backlog of backups make good sense? (Besides the obvious methods, keep everything, or keep nothing.) Here's what I wrote that does what I just described, for what it's worth. I already want to add one feature to it, which is to keep at least N backup files, no matter what. Where N is the number of "ages" to keep (3 in the above example). LV 8.0. http://forums.lavag.org/index.php?act=attach&type=post&id=6777http://forums.lavag.org/index.php?act=attach&type=post&id=6778 Quote Link to comment
Yair Posted August 29, 2007 Report Share Posted August 29, 2007 I didn't look at the code, but I would probably create a folder for each backup with a formatted timestamp as part of the folder name. Then, whenever you do a backup, you also go over the list of existing backups and delete all the folders which are older than N. Quote Link to comment
LAVA 1.0 Content Posted August 30, 2007 Report Share Posted August 30, 2007 Am I stating the obvious, but what about source code control? It does go the 'everyting' route, but I know for sure that Perforce optimizes the different versions so it does not necessarily save the entire file for each version. Quote Link to comment
torekp Posted August 30, 2007 Author Report Share Posted August 30, 2007 QUOTE(yen) I didn't look at the code, but I would probably create a folder for each backup with a formatted timestamp as part of the folder name. Then, whenever you do a backup, you also go over the list of existing backups and delete all the folders which are older than N. Pretty much what I'm doing, except I timestamp the filenames not folders, and I do keep selected files older than N. QUOTE(NormKirchner @ Aug 29 2007, 01:42 AM) Am I stating the obvious, but what about source code control? It does go the 'everyting' route, but I know for sure that Perforce optimizes the different versions so it does not necessarily save the entire file for each version. Not obvious at all (or maybe I'm just slow). But this means I'd have to start using source code control - probably a desperately needed idea even without this side-benefit... Thanks for the suggestion. Quote Link to comment
Chris Davis Posted August 30, 2007 Report Share Posted August 30, 2007 QUOTE(torekp @ Aug 29 2007, 06:59 AM) But this means I'd have to start using source code control - probably a desperately needed idea even without this side-benefit... It really is worth it. As a side benefit, everything that you source code control can usually be backed up with calls to the source code control program. For SVN you can use the concept of a "hot copy" to back up all of the data in your source code control repository to another path. Quote Link to comment
Aristos Queue Posted August 30, 2007 Report Share Posted August 30, 2007 QUOTE(chrisdavis @ Aug 29 2007, 08:46 AM) It really is worth it. As a side benefit, everything that you source code control can usually be backed up with calls to the source code control program. For SVN you can use the concept of a "hot copy" to back up all of the data in your source code control repository to another path. Query: Has NI Week ever had a presentation on using source code control with LabVIEW? It seems to come up as a topic of conversation regularly, and perhaps NI should have a presentation in the library for sales folks to be able to present on this topic. Would that be a good topic to suggest for next year? Quote Link to comment
Yair Posted August 30, 2007 Report Share Posted August 30, 2007 I was thinking of SCC as well, although that doesn't conform to the exact specs and it requires some overhead. However, if this is for your own code, you should definitely use it. We also use SVN with TSVN for the interface and the greatest benefit so far is the ease of synchronization. Getting the changes other developers made requires two (yes, two) mouse clicks and waiting a few seconds. QUOTE(Aristos Queue @ Aug 29 2007, 04:50 PM) Would that be a good topic to suggest for next year? It probably would, but it would depend on what your target audience is. I'm fairly sure Brian Powell's presentation about NI's software engineering practices and Jim Kring's presentation about commercial software apps discussed this topic (I'm sure Jim can correct me if I'm wrong). Quote Link to comment
Bobillier Posted August 31, 2007 Report Share Posted August 31, 2007 My solution for archive files. Need openG Eric Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.