Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BASH
(view source)
Revision as of 18:36, 28 January 2019
1 byte added
,
18:36, 28 January 2019
→Backup Hard Drive
Line 207:
Line 207:
<source lang="bash">#!/bin/bash
<source lang="bash">#!/bin/bash
USAGE="./$(basename ${0}) UUID output_filename"
USAGE="./$(basename ${0}) UUID output_filename"
+
BACKUP_ROOT=/mnt/backup
if [ -z "${1}" ]; then
if [ -z "${1}" ]; then
Line 217:
Line 218:
fi
fi
−
BACKUP_ROOT=/mnt/backup
HD=$(blkid | grep $1 | awk -F : '{print $1}')
HD=$(blkid | grep $1 | awk -F : '{print $1}')
ISO=${BACKUP_ROOT}/$(hostname)/$(date '+%Y/%m')/$2.iso
ISO=${BACKUP_ROOT}/$(hostname)/$(date '+%Y/%m')/$2.iso
+
dd if=${HD} of=${ISO} bs=1M</source>
dd if=${HD} of=${ISO} bs=1M</source>
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version