User Tools

Site Tools


removable_disk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
removable_disk [2009/07/20 20:10]
sathe appearance fixes
removable_disk [2010/11/12 20:08] (current)
darrick
Line 2: Line 2:
 ===Josh Fisher=== ===Josh Fisher===
 ==Revision History== ==Revision History==
 +
 +Revision 0.9.1 2009-10-27
 +  * Vchanger is now an open source project hosted at SourceForge at http://​sourceforge.net/​projects/​vchanger/​. The most recent howto is included in the source tarball.
  
 revision 0.9 2009-01-26 revision 0.9 2009-01-26
  
-  * Moved to http://​wiki.backula.org+  * Moved to http://​wiki.bacula.org
  
 Revision 0.8 2008-12-06 Revision 0.8 2008-12-06
Line 23: Line 26:
   * Initial version.   * Initial version.
  
-This document describes how to utilize removable disk drives as backup media for a backup solution using [[http://​www.bacula.org/​|Bacula]] +This document describes how to utilize removable disk drives as backup media for a backup solution using [[http://​www.bacula.org/​|Bacula]].\\  
- +In addition to reading this guide you could check out [[http://​bacula.svn.sourceforge.net/​viewvc/​bacula/​trunk/​bacula/​scripts/​disk-changer.in?​view=markup|"​disk-changer"​ script]] which is part of bacula distribution.
  
 ====1. Introduction==== ====1. Introduction====
Line 88: Line 90:
 The second parameter is the autochanger command to be performed and is either one of the standard Bacula autochanger API commands: The second parameter is the autochanger command to be performed and is either one of the standard Bacula autochanger API commands:
  
-  * load                 Load a "​tape"​ from a magazine "​slot"​ into a "​drive"​. Vchanger creates a symlink with the name passed in parameter 4 (archive_device) pointing to the file mIIsJJJ, where II is the two digit magazine index and JJJ is the slot number passed to Vchanger as parameter 3.+  ​* **load**                 Load a "​tape"​ from a magazine "​slot"​ into a "​drive"​. Vchanger creates a symlink with the name passed in parameter 4 (archive_device) pointing to the file mIIsJJJ, where II is the two digit magazine index and JJJ is the slot number passed to Vchanger as parameter 3.
  
-  * unload ​            ​Unload a "​tape"​ from the "​drive"​ back into the magazine "​slot"​. Vchanger deletes the symlink that was created by a previous load command for the drive.+  ​* **unload**             Unload a "​tape"​ from the "​drive"​ back into the magazine "​slot"​. Vchanger deletes the symlink that was created by a previous load command for the drive.
  
-  * loaded ​            ​Return the "​slot"​ currently loaded into the "​drive"​.+  ​* **loaded**             Return the "​slot"​ currently loaded into the "​drive"​.
  
-  * list                   List the barcodes of the "​tapes"​ in each of the "​slots"​ in this magazine.+  ​* **list**                   List the barcodes of the "​tapes"​ in each of the "​slots"​ in this magazine.
  
-  * slots                Return the number of slots per magazine.+  ​* **slots**                ​Return the number of slots per magazine.
  
 ... or one of the vchanger extended commands: ​ ... or one of the vchanger extended commands: ​
  
-  * purge               ​Delete all volumes in a magazine and re-create them using the bconsole 'label barcodes'​ command. Volumes are deleted from the Bacula catalog using the bconsole '​delete volume'​ command, and the files acting as virtual tapes containing those volumes are deleted from the virtual magazine filesystem.+  ​* **purge**               Delete all volumes in a magazine and re-create them using the bconsole 'label barcodes'​ command. Volumes are deleted from the Bacula catalog using the bconsole '​delete volume'​ command, and the files acting as virtual tapes containing those volumes are deleted from the virtual magazine filesystem.
  
 The third parameter is the slot number to use for the current command. The third parameter is the slot number to use for the current command.
Line 152: Line 154:
 ===6.2 Formatting / Labeling Magazine Partitions=== ===6.2 Formatting / Labeling Magazine Partitions===
  
-Assuming the drive was assigned node /dev/sdc, the partition can now be formatted and labeled using:+Assuming the drive was assigned node /dev/sdX, the partition can now be formatted and labeled using:
  
-  mke2fs -j -T largefile -L "​usbchanger1"​ /dev/sdc1+  mke2fs -j -T largefile -L "​usbchanger1" ​-m 0 /dev/sdX1
  
 This will create a new ext3 filesystem on the partition with filesystem label '​usbchanger1'​. Now unplug the USB drive, wait a few seconds, then plug it back in. A few seconds after plugging it in you should see a symlink /​dev/​disk/​by-label/​usbchanger1 pointing to whatever device node udev decided to assign to the partition. Now try: This will create a new ext3 filesystem on the partition with filesystem label '​usbchanger1'​. Now unplug the USB drive, wait a few seconds, then plug it back in. A few seconds after plugging it in you should see a symlink /​dev/​disk/​by-label/​usbchanger1 pointing to whatever device node udev decided to assign to the partition. Now try:
Line 168: Line 170:
 ====7. Installing vchanger==== ====7. Installing vchanger====
  
-Place a copy of the [[#​vchanger|vchanger shell script]] in the /etc/bacula directory, than change its owner and permissions as foolows:+Place a copy of the [[#​vchanger|vchanger shell script]] in the /etc/bacula directory, than change its owner and permissions as follows:
  
   chown root.disk /​etc/​bacula/​vchanger   chown root.disk /​etc/​bacula/​vchanger
Line 384: Line 386:
 # Return length of string $1 # Return length of string $1
 # #
-function strlen () +if [ `uname` = "​FreeBSD"​ ] 
-+then 
-   ​expr length $1 +        ​function strlen () 
-}+        
 +                expr -- "​$1"​ : "​.*"​ 
 +        } 
 +else 
 +        function strlen () 
 +        { 
 +                ​expr length $1 
 +        } 
 +fi 
  
 # #
removable_disk.1248117036.txt.gz · Last modified: 2009/07/20 20:10 by sathe