Skip to content

Commit

Permalink
[_posts] 2019-11-12 : Deletion protection for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
kitcharoenp committed Jan 10, 2021
1 parent fc60efd commit a2c711c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions _posts/2019-11-12-lxd_linux_containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lxc launch ubuntu:20.04 ubuntu2004
```


### Chnage bridge IP address
### Chnage bridge IP address
```shell
$ lxc network edit lxdbr0

Expand Down Expand Up @@ -94,7 +94,19 @@ lxc copy foo:c1 c2

# copy of a container with snapshot
lxc copy foo:c1/snapshot1 c3
```
```
### Deletion protection for containers
```
# Set protection.delete
$ lxc config set c1 security.protection.delete true
$ lxc delete c1
Error: Container is protected

# Unset protection.delete
$ lxc config unset c1 security.protection.delete
$ lxc delete c1
```
[1]: https://lxd.readthedocs.io/en/latest/storage/ "LXD"
Expand Down

0 comments on commit a2c711c

Please sign in to comment.