...
Code Block |
---|
oci psql backup get --backup-id <backup_OCID> |
Next The next step is to do a backup of the file system used.
Note |
---|
Note! If there are standalone ECs that are still running and writing their logs to the same file system, whatever happens events happening after the backup has been initiated will not be included in the backup. |
...
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Restore
...
Database Backup
To restore the backup, run these commands:
Code Block |
---|
oci psql db-system restore --db-system-id <db_system_OCID> --backup-id <backup_OCID> |
Restore
...
File System Snapshot
To restore a file system snapshot , you need to access the snapshots via a Kubernetes Pod.
You need to must know the mount target IP address prior to mounting the file system onto the Pod. Before running the Pod, retrieve the mount target IP address from PV output:
...
You will see the command prompt if the Pod created and running. The command prompt indicates that you have login logged in to the Pod successfully.
Code Block |
---|
user1@user1-MacBook-Pro ~ % kubectl run nfscli --rm --tty -i --restart='Never' --namespace uepe --image oraclelinux --privileged=true --command -- bash If you don't see a command prompt, try pressing enter. [root@nfscli /]# [root@nfscli /]# |
On the pod, download and install nfs-utils. These are libraries and executables need needed to access the File System Storage.
Code Block |
---|
[root@nfscli /]# yum -y install nfs-utils |
On the pod, create the mount directory. This is the directory where the mounted file system is located at.
Code Block |
---|
[root@nfscli /]# mkdir -p /mnt/uepe |
...
On the pod, mount the file system with the mount target IP address that you retrieved and saved prior to running the pod.
Code Block |
---|
[root@nfscli /]# mount -o nolock <IP address of the mount target>:/uepe /mnt/uepe |
...
To restore these snapshots within the Pod, copy these snapshots to the destination directory.
Code Block |
---|
[root@nfscli /]# cp -rp /mnt/uepe/.snapshot/<snapshot_name>/* <destination_directory_name> |
For example, to restore “snapshot-aug-3
“ snapshot to platform volume mount directory, follow these steps:
clean Clean up the existing platform volume mount directory.
Code Block |
---|
[root@nfscli /]# rm -rf /mnt/uepe/* |
copy Copy data from “
snapshot-aug-3
“ to platform volume mount directory.
...
Note!
...
Always double check the file permission when you copy or move these snapshots. You want to preserve the file permission when you copy or move
Code Block |
---|
[root@nfscli /]# cp -rp /mnt/uepe/.snapshot/snapshot-aug-3/* /mnt/uepe/ |
Unmount the file system if restore completed successfully.
Code Block [root@nfscli /]# umount /mnt/uepe/
Exit the Pod
Code Block |
---|
[root@nfscli /]# exit |
...