0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ディスクコピー

Last updated at Posted at 2018-12-23


fdisk -l |grep /dev/sd
pvscan
vgscan
lvscan

vgdisplay

umount /test
vgchange -a n vg02

vgimportclone /dev/sdc1

pvscan
vgscan
lvscan

vgchange -a y vg02
vgchange -a y vg021

mkdir /test2

mount /dev/mapper/vg02-lv01 /test

mount -t xfs -o ro,nouuid /dev/vg021/lv01 /test2

[root@tdb01 ~]# xfs_admin -U generate /dev/vg021/lv01
Clearing log and setting UUID
writing all SBs
new UUID = 94270df5-c24e-4abd-a4d0-32918a36eadb

■vg削除
lvscan
vgscan
pvscan

umount /test2

vgchange -a n vg021

vgremove vg021

lvscan
vgscan
pvscan

pvremove /dev/sdc1

pvscan


@echo off

REM ■バッチ名
REM RPリポジトリ外部バックアップ

REM ■処理概要
REM DドライブのRPのバックアップデータをNASにコピー(バックアップ)する。

REM ■処理対象
REM コピー元:D:\PLANET\BACKUP、D:\PLANET_STAR\BACKUP
REM コピー先:backup\01_databackup\PLANET、backup\01_databackup\PLANET_STAR

REM 変数設定
set src1=D:\PLANET\BACKUP
set src2=D:\PLANET_STAR\BACKUP
set dest1=\192.168.1.111\Landisk\backup\01_databackup\PLANET
set dest2=\192.168.1.111\Landisk\backup\01_databackup\PLANET_STAR

REM 前々日分削除
del /F /Q %dest1%\OLD*
del /F /Q %dest2%\OLD*

REM 前日分退避
move %dest1%\CURRENT* %dest1%\OLD
move %dest2%\CURRENT* %dest2%\OLD

REM 当日分コピー
xcopy /e /h /d %src1% %dest1%\CURRENT
xcopy /e /h /d %src2% %dest2%\CURRENT

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?