Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/planix-v0/sys/lib/backup/backuparenas – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
# backuparenas dev name ... - dump arena `name' from $fs to blu-ray disc.
3
#	assumes $set is set.
4
rfork ne
5
# tunable variables
6
fs=pie
7
 
8
if (test -e /sys/lib/backup/funcs)
9
	.   /sys/lib/backup/funcs
10
 
11
exits=''
12
fsroot=/n/$fs
13
if (! test -e $fsroot/!THIS_IS_^`{echo $fs | tr a-z A-Z}^_MAIN) {
14
	import $fs / $fsroot || exit
15
}
16
unmount /mnt/cd >[2]/dev/null
17
cdfs -d $1 || exit
18
shift
19
 
20
done=no
21
echo -n figuring out disc type...
22
for (i in `{seq 1 20})
23
	if (~ $done no) {
24
		m=`{ls -l /mnt/cd | grep bd-r-dl}
25
		if (~ $m '' ()) {
26
			echo -n .
27
			sleep 3
28
		}
29
		if not
30
			done=yes
31
	}
32
echo
33
 
34
ls -l /mnt/cd
35
grep next /mnt/cd/ctl
36
echo -n 'nwa ok? '
37
ok=`{read}
38
if (! ~ $ok [Yy]*)
39
	exit bad-nwa
40
 
41
cd $fsroot/dev/fs
42
shname = `{basename $arenas}
43
if (! test -r $shname){
44
	echo $0: $shname in `{pwd} not readable >[1=2]
45
	exit unreadable-arenas
46
}
47
 
48
for (name) {
49
	grep next /mnt/cd/ctl
50
	# use -o 8192 to avoid devmnt fragmentation if bd drive is imported
51
	venti/rdarena $shname $name |
52
		pump -i 65536 -o 8192 -k 100000 -d 5 >/mnt/cd/wd/$name
53
#		pump -i 65536 -o 1048576 -k 51200 -d 10 >/mnt/cd/wd/$name
54
	quitonfailure $status
55
 
56
#	ls -l /mnt/cd
57
	if (test -e '/env/fn#dumpdone' -a -e '/env/set')
58
		dumpdone $shname $name
59
}
60
echo 'remember to *not* remove /mnt/cd/wd' >[1=2]
61
# don't remove /mnt/cd/wd, since that would finalize the disc
62
# and bugger the permanent toc, at least on bd-r.
63
exit ''