I'm new in using Docker,
I want to backup volume from Server Computer to User Computer (From Different Computer), the step that I have done :
Running docker container with this command on Server Computer :
docker run --restart=always -d -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true --mount source=oracle_vol,target=/u01/app/oracle wnameless/oracle-xe-11g:latest
Then I backup the volume with this command :
docker run -it --rm -v oracle_vol:/volume -v /home/server123/backup/:/backup wnameless/oracle-xe-11g:latest tar -cjf /backup/orclvols_archive.tar.bz2 -C /volume ./
Then I copy the .tar.bz2 to User Computer and restore the volume with this command :
docker run -it --rm -v oracle_vol:/volume -v /home/user123/backup_docker/:/backup wnameless/oracle-xe-11g:latest sh -c "rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar -C /volume/ -xjf /backup/orclvols_archive.tar.bz2"
Then run container in User Computer with command :
docker run --restart=always -d -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true --mount source=oracle_vol,target=/u01/app/oracle wnameless/oracle-xe-11g:latest
And I got this error :
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0
I'm new in using Docker, I want to backup volume from Server Computer to User Computer (From Different Computer), the step that I have done :
Running docker container with this command on Server Computer :
docker run --restart=always -d -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true --mount source=oracle_vol,target=/u01/app/oracle wnameless/oracle-xe-11g:latest
Then I backup the volume with this command :
docker run -it --rm -v oracle_vol:/volume -v /home/server123/backup/:/backup wnameless/oracle-xe-11g:latest tar -cjf /backup/orclvols_archive.tar.bz2 -C /volume ./
Then I copy the .tar.bz2 to User Computer and restore the volume with this command :
docker run -it --rm -v oracle_vol:/volume -v /home/user123/backup_docker/:/backup wnameless/oracle-xe-11g:latest sh -c "rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar -C /volume/ -xjf /backup/orclvols_archive.tar.bz2"
Then run container in User Computer with command :
docker run --restart=always -d -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true --mount source=oracle_vol,target=/u01/app/oracle wnameless/oracle-xe-11g:latest
And I got this error :
If I backup & restore it on the same Computer, I got no error and it run smoothly.
So how to backup the volume Then restore it on different computer? Is it possible?
I use this https://loomchild.net/2017/03/26/backup-restore-docker-named-volumes/ as reference.
Thanks