壓縮到遠端
tar -zcpf – xxx | ssh remote@ip dd of=/backup/xxx.tar.gz
壓縮檔在遠端解壓
cat xxx.tar.gz | ssh remote@ip tar.gz zxf – -C /restore
#-C 後面接遠端主機的路徑
傳輸過程壓縮在解壓
tar -zcpf – xxx | ssh -c /resoter remote@server tar -zxf -
壓縮到遠端
tar -zcpf – xxx | ssh remote@ip dd of=/backup/xxx.tar.gz
壓縮檔在遠端解壓
cat xxx.tar.gz | ssh remote@ip tar.gz zxf – -C /restore
#-C 後面接遠端主機的路徑
傳輸過程壓縮在解壓
tar -zcpf – xxx | ssh -c /resoter remote@server tar -zxf -
參考節錄:
https://www.weithenn.org/2021/07/powershell-ping.html?fbclid=IwAR0vtSQS_CRZiBNDSm0eOc89RQlY2Y6-hsU0OCKb7mu0Ub7yxjTLwSY0MQQ
# ==================================================================
# Description: Test ping connectivity by hosts list
# ==================================================================
# Get hosts list
$Ping_hosts = Get-Content -Path C:\PowerShell\Ping_hosts.txt
# Verify the number of hosts
(Get-Content -Path C:\PowerShell\Ping_hosts.txt).Count
# Test ping connectivity by hosts list
foreach ($Hosts in $Ping_hosts){
If (Get-ADComputer -Filter {Name -eq $Hosts}){
Write-Host "$Hosts – host exists try to ping!" -ForegroundColor Green
# For PingReplyDetails (RTT) label and value
$RTT = @{Label = "PingReplyDetails (RTT)"; Expression = {$_.PingReplyDetails.RoundTripTime.ToString() + " ms"}; align="right"}
Test-NetConnection -ComputerName $Hosts | Format-Table ComputerName, RemoteAddress, PingSucceeded, $RTT -AutoSize
} else {
Write-Host "$Hosts – name resolution failed!" -ForegroundColor Red
}
}
Dism /Online /Cleanup-Image /ScanHealth
掃描全部系統文件和系統映像文件是否與官方版一致(無論你是否備份或製作過系統映像)
Dism /Online /Cleanup-Image /CheckHealth
檢查文件的損壞程度
DISM /Online /Cleanup-image /RestoreHealth
一般性損壞可以修復
Dism /online /Get-CurrentEdition
檢查映像版本
Dism /online /Get-TargetEditions
檢查系統是否可升級
咱們首先需要將映像(.iSO)「裝載」在系統中,然後
Dism /Apply-Image /ImageFile:X:\sources\install.wim /Index:1 /ApplyDir:C:\
其中,X代表映像掛載後的盤符
dd clone disk
dd if=/dev/sda of=/dev/sdb bs=64k conv=noerror,sync
dd make disk image
dd if=/dev/sda conv=sync,noerror bs=128k |gzip -c centos-disk.gz
dd restore image
gunzip -c centos-disk.gz | dd of=/dev/sdb
conv=noerror #告訴 dd 繼續操作,忽略所有讀取錯誤。
sync #如果有任何讀取錯誤,則添加帶有零的輸入塊,因此數據偏移量保持同步。
See progress while making an image with dd
dd if=/dev/sda conv=sync,noerror status=progress bs=128k |gzip -c centos-disk.gz
dd clone MBR
dd if=/dev/sda of=/dev/sdb bs=512 count=1
dd save MBR to image
dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1
映像恢復到任何 sdb: 上述命令將保留分區模式
dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1
分割區備份
sfdisk -d /dev/sda > /tmp/sda.bak
分割區恢復
# sfdisk /dev/sda
only delete MBR
dd if=/dev/zero of=/dev/sda bs=446 count=1
delete all partition and MBR
dd if=/dev/zero of=/dev/sda bs=512 count=1
1: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:1
Dword (32位元) AllowInsecureGuestAuth,數值設定為1
2.Windows Server
gpedit.msc
電腦設定系統-管理範本–> 網路-Lanman 工作站
啟用不安全的來賓 登入
遇到發生在 有顯卡的筆電
Proxmox VE 安裝的開機啟動選項,
按下 e 之後追加幾個參數 rd.driver.blacklist=nouveau nouveau.modeset=0 ,
並按下 Ctrl + X 啟動之後,成功進入開機引導程序。
在設定檔上加上這句
#redirect-gateway def1
或以下設定檔
#Template client.ovpnclient
client
dev tun
proto tcp-client
#remote FQDN
remote FQDN
port 1194
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
ca ca.crt
cert client.crt
key client.key
verb 4
mute 10
cipher AES-256-CBC
auth SHA1
auth-user-pass secret
auth-nocache
#comp-lzo
#route 192.168.10.0 255.255.255.0
route 192.168.1.0 255.255.255.0
#status openvpn-status.log
#log-append openvpn.log
qcow2 搬移
mkdir /vmimage/images/111
cp /vmimage/images/111/vm-111-disk-0.qcow2 /vmimage/images/112/vm-112-disk-0.qcow2
zfs 搬移
zfs snapshot vmimage/vm-111-disk-0@copy #copy
zfs send -Rv vmimage/vm-111-disk-0@copy | zfs receive -F vmimage/vm-112-disk-0 #Send
zfs destroy vmimage/vm-111-disk-0@copy ; zfs destroy vmimage/vm-112-disk-0@copy #Destroy
vi /etc/pve/qemu-server/vm112 的設定