Description:
This script migrates all libraries of a user from one storage backend to another
usage:
./moveLibraryToStorageBackend --mode info --library UUID
./moveLibraryToStorageBackend --mode migrate --library UUID --source STORAGE --target STORAGE
./moveLibraryToStorageBackend --mode cleanup --library UUID --source STORAGE
optional parameters
mode info: [--config FILE]
mode migrate: [--config FILE] [--dry-run] [--verbose] [--safety-period SECONDS] [--up-to SIZE]
mode cleanup: [--config FILE] [--dry-run] [--verbose]
Parameters:
Called without any parameters this script just displays this help text
-c, --config
a config file; defaults to moveLibraryToStorageBackend.conf if this parameter is omitted
-d, --dry-run
don’t actually migrate or clean up libraries, just show what would to be done
-h, --help
display this help text
–info
display this help text and additional information about this script
-m, --mode MODE
Set the main mode of this script; mandatory; valid modes are:
- info : Shows basic information like name, type, storage backend of libraries
- migrate : Migrates libraries from one to another storage backend
- cleanup : Deletes already migrated libraries on the old storage backend
-l, --library UUID
The UUID of a library that should be migrated; which can be one of the following:
- UUID - to select a single library
- oldest-unused:NUMBER - to select the number of libraries that are unused, i.e. not modified longest
- user:EPPN - to select all libraries of a user
-p, --safety-period SECONDS
seconds that a library has to be unchanged before it is migrated
if omittet this parameter defaults to 3600 seconds
-s, --source STORAGE
the storage-id of the current storage, mandatory for modes migrate and cleanup
valid storage ids are: nfs_data and nfs_001 to nfs_008
-t, --target STORAGE
the storage-id of the target storage, mandatory for mode migrate
valid storage ids are: nfs_data and nfs_001 to nfs_008
-u, --up-to SIZE
maximum size of all migrated libraries in MByte to avoid consuming the entire space
of the target partition
-v, --verbose
verbose output