If your files are less than 4.4 Gbytes (4,700,000 bytes) in total, doing a back-up using a DVD is a viable solution. To prepare a 'closed' DVD containing your data (and assuming that you've already loaded the DVD on norma), give
# growisofs -Z /dev/dvd -R -J -iso-level 3 <name of file or directory you want to write> # eject /dev/dvd
and then go to the machine room to collect your disk. The so produced DVD should be readable on both unix and windoze machines, but don't take my word for it: try it with your machine to make sure that your files have been properly backed-up.
mysim
subdirectory. Tell her du -hs mysim
and confirm that the reported size is less than 36 Gbytes (this assumes that you back-up a DCD trajectory on an empty tape. DCDs do not compress well). If the tape already contains data you should make sure that everything will fit in the space still available on your tape.# script <== Keep a record of the session # mt -f /dev/nst0 setblk 65536 <== Set block size to 64K # mt -f /dev/nst0 eod <== Move to the end-of-data # mt -f /dev/nst0 tell <== Report current position on tape (in 64K block units). # # <== Human calculates: will my data fit on this tape ? # # tar -b 128 -cvf /dev/nst0 mysim <== Write the data uncompressed to the drive. Use 'jcvf' for compression # mt -f /dev/nst0 eod <== Move to end of the tape # mt -f /dev/nst0 tell <== Report current position on tape (in 64K block units). # mt -f /dev/nst0 offline <== Unload tape. # exit <== Close 'script' session. Output in file named 'typescript'
DAT writing speed: You should expect something close to 6.5 minutes per gigabyte (approximately four hours for 36 GBytes (ie. a full tape)).
The traditional method is passwordless access to norma, as outlined later on. This is insecure and is not available. A much better method is to use ssh + dd and to type your password, as follows:
From the to-be-backed-up machine, and as a normal user, do (you will be asked for your password several times, don't forget to change 'glykos' with your user name):
# ssh glykos@norma.mbg.duth.gr mt -f /dev/nst0 eod # ssh glykos@norma.mbg.duth.gr mt -f /dev/nst0 tell # cd /home/ # tar cpfzv - ./glykos/ | ssh -c blowfish glykos@norma.mbg.duth.gr dd of=/dev/nst0 # ssh glykos@norma.mbg.duth.gr mt -f /dev/nst0 tell # ssh glykos@norma.mbg.duth.gr mt -f /dev/nst0 offline
From the to-be-backed-up machine, and as root do (note that we leave the block size variable so that we can use compression):
# ssh root@norma.mbg.duth.gr mt -f /dev/nst0 eod Password: # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 tell Password: At block 0. # # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 status Password: SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x47 (DDS-5 or TR-5). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN # # # /sbin/dump -0uanz -f - / | ssh -c blowfish root@norma.mbg.duth.gr dd of=/dev/nst0 Password: DUMP: Date of this level 0 dump: Fri Jun 4 18:10:03 2010 DUMP: Dumping /dev/sda1 (/) to standard output DUMP: Label: none DUMP: Writing 10 Kilobyte records DUMP: Compressing output at compression level 2 (zlib) DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 23800384 blocks. DUMP: Volume 1 started with block 1 at: Fri Jun 4 18:10:05 2010 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: 3.39% done at 2686 kB/s, finished in 2:22 DUMP: 6.58% done at 2610 kB/s, finished in 2:21 DUMP: 10.25% done at 2710 kB/s, finished in 2:11 DUMP: 14.39% done at 2854 kB/s, finished in 1:58 ... DUMP: 87.21% done at 2562 kB/s, finished in 0:19 DUMP: 90.87% done at 2574 kB/s, finished in 0:14 DUMP: 94.53% done at 2586 kB/s, finished in 0:08 DUMP: 96.74% done at 2558 kB/s, finished in 0:05 DUMP: 98.82% done at 2528 kB/s, finished in 0:01 DUMP: Volume 1 completed at: Fri Jun 4 20:46:48 2010 DUMP: Volume 1 took 2:36:43 DUMP: Volume 1 transfer rate: 1090 kB/s DUMP: Volume 1 23776070kB uncompressed, 10256378kB compressed, 2.319:1 DUMP: 23776070 blocks (23218.82MB) DUMP: finished in 9403 seconds, throughput 2528 kBytes/sec DUMP: Date of this level 0 dump: Fri Jun 4 18:10:03 2010 DUMP: Date this dump completed: Fri Jun 4 20:46:48 2010 DUMP: Average transfer rate: 1090 kB/s DUMP: Wrote 23776070kB uncompressed, 10256378kB compressed, 2.319:1 DUMP: DUMP IS DONE 20512510+487 records in 20512757+1 records out 10502531942 bytes (11 GB) copied, 9401.17 s, 1.1 MB/s # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 tell Password: At block 20512759. # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 eod Password: # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 tell Password: At block 20512759. # # ssh root@norma.mbg.duth.gr mt -f /dev/nst0 offline Password: # # # # # ssh -c blowfish root@norma.mbg.duth.gr dd if=/dev/nst0 | /sbin/restore -i -f - Password: Dump tape is compressed. /sbin/restore > /sbin/restore > ls .: bin/ home/ media/ sbin/ usr/ boot/ initrd.img@ mnt/ selinux/ var/ cdrom/ initrd.img.old@ opt/ srv/ vmlinuz@ dev/ lib/ proc/ sys/ vmlinuz.old@ etc/ lost+found/ root/ tmp/ /sbin/restore > cd home/glykos /sbin/restore > ls ./home/glykos: ..... .gnome/ .pinepgp/ tmp/ /sbin/restore > /sbin/restore > cd /sbin/restore > /sbin/restore > quit
Assuming that passwordless ssh access to norma exists and has been correctly set-up, a typical dump
session would look like this:
# setenv RSH ssh # setenv RMT /usr/local/sbin/rmt # ssh norma mt -f /dev/nst0m setblk 65536 # ssh norma mt -f /dev/nst0m eod # ssh norma mt -f /dev/nst0m tell # dump -0 -b 64 -L "05jun09_L0" -u -f root@norma.mbg.duth.gr:/dev/nst0m / # ssh norma mt -f /dev/nst0m tell # ssh norma mt -f /dev/nst0m rewind # ssh norma mt -f /dev/nst0m offline