# 將容器備份

![](https://529150212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh81JtaIQ84bwQqz_Wh%2F-Lqoe1X04gsxU_6MfiC7%2F-LqoeS_dMAwuKkcxk9g5%2Fimage.png?alt=media\&token=f76bf995-9938-4ff6-946a-da5f5293ab06)

備份位置通常位於/var/lib/vz/dump中

利用 rsync 備份到不在叢集的機器&#x20;

```
rsync -avP root@120.115.4.161:/var/lib/vz/dump/ /var/lib/vz/dump/
The authenticity of host '120.115.4.161 (120.115.4.161)' can't be established.
ECDSA key fingerprint is SHA256:j9j3oNNrqMJzmutin/G0IDSlDPBInjDA3YMcFrCp0Yo.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '120.115.4.161' (ECDSA) to the list of known hosts.
root@120.115.4.161's password: 
receiving incremental file list
./
vzdump-lxc-103-2019_10_10-15_55_13.log
            526 100%  513.67kB/s    0:00:00 (xfr#1, to-chk=1/3)
vzdump-lxc-103-2019_10_10-15_55_13.tar.lzo
      9,830,400   1%  508.56kB/s    0:20:04  



```
