amos@crdc-vax2.ARPA (Bob Amos) (08/05/85)
Is anybody aware of any commercial or other systems to archive to tape Vax 11/780 Unix 4.2 files that have not been accessed for a past period of time (say 90 days)? Information on how your site gets rid of files that users forget about would be appreciated. We don't want to delete these files without a tape backup and reload capability. -Bob Amos (amos@crdc)
gwyn@BRL.ARPA (VLD/VMB) (08/06/85)
$ # How to archive then delete user files not accessed for 90 days: $ su Password: # cd name-of-user-filesystem # find . ! -atime 90 -depth -print >/usr/tmp/FILELIST # find files # # (The above two can be combined if you like # # absolute pathnames in your tape archive.) # cpio -ocB </usr/tmp/FILELIST >/dev/rmt/0m # make tape # cpio -icBtv </dev/rtm/0m | lp & # print TOC # while read file > do rm -f "$file" # delete files > done </usr/tmp/FILELIST # exit $
hosking@convexs.UUCP (08/09/85)
> /* Written 4:04 pm Aug 5, 1985 by gwyn@BRL.ARPA in convexs:net.unix */ > /* ---------- "Re: file archiving" ---------- */ > $ # How to archive then delete user files not accessed for 90 days: > $ su > Password: > # cd name-of-user-filesystem > # find . ! -atime 90 -depth -print >/usr/tmp/FILELIST # find files . . . > do rm -f "$file" # delete files I hope you're doing this single user! Otherwise, it seems like you'd run the risk of having race conditions with someone updating files while you're doing the archiving/deleting. Perhaps not all that likely, but Murphy's been working overtime here lately. Doug Hosking Convex Computer Corp. Richardson, TX {allegra, ihnp4, uiucdcs}!convex!convexs!hosking
gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (08/15/85)
> I hope you're doing this single user! Otherwise, it seems like you'd > run the risk of having race conditions with someone updating files while > you're doing the archiving/deleting. Perhaps not all that likely, but > Murphy's been working overtime here lately. I know of no way to avoid that possibility, other than as you say being single-user. The only danger in the race would be that a file being updated might get put on the tape then removed, so that the archival copy would be corrupted. You will note that I did make a single temp file containing the names and used it for both archiving and deleting, to make sure that nothing could get deleted that wasn't on the tape. (I forgot to say that one should remove this temp file (list of filenames) when he is done; presumably if one does this activity on a regular basis he would want to keep the file list on-line so that one could easily find which tape had the deleted file that one later needs restored.)
root@bu-cs.UUCP (Barry Shein) (08/17/85)
The find command seemed like a good start for file archiving, while we're simulating TOPS-20 with a few shell commands why not go a little farther...either replace the file's contents with the tapeid or (if you're worried about inodes) append a line 'filename tapeid' to a user's $HOME/.archive file? Sure would make it easier to get it back when they panic about it being gone. Also, would let them know what happened. Of course, mine would be: % cat .archive .archive TAPE00777 % :-) -Barry Shein, Boston University P.S. as I remember TOPS could generate a tape mount request to the operator automatically upon an open of an archived file, maybe we should make a symbolic link to the tape and then...oh this is getting weird, sorry.