-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: backup cassandra docker #45
Comments
hi @vbpatil449 , yes it should and if it does not it is wrong, do you have just this log? I think there should be complete stracktrace with the cause. It fails somewhere here
I think your Docker does not know anything about Kubernetes so it fails or similar ... getting more logs would definitely help. I will check this for you no worries. |
Thanks for getting back. I think the issue is because docker is on a different network(docker-network) - host doesn't have access to jmxrmi port I think. I was able to run the the backup inside the docker network (containers) and as well as backup-commitlog I am using Can you provide the commands to restore the snapshot and as well as restore commit-log ? I tried hardlinks steps as per the README - which seems to fail in my case due to local File ... 22:59:19.269 ERROR com.instaclustr.esop.impl.restore.RestorationPhase$HardlinkingPhase - Unable to create a hardlink from /tmp/download/sstables/test/emp-d0ef1b806b3211eba5d19116fc548b6b/md-1-big-CompressionInfo.db to /var/lib/cassandra/data/test/emp-d0ef1b806b3211eba5d19116fc548b6b/md-1-big-CompressionInfo.db, skipping the linking of all other resources and deleting already linked ones. |
Hi @vbpatil449 , Do I understand it right that your original exception has disappeared and it is not a problem anymore as you have successfully backed up your data from inside of a Docker container? Yes, your restore failed because you are trying to hard-link a file from outside of a container to a file inside of a container and that is not possible in Docker. You may link only files which are inside container so I think that your restoration has to be run in Docker container and files will be stored in container too hence linking will not fail. Examples of commit log and normal restoration might be found here: https://github.com/instaclustr/esop#backup-and-restore-of-commit-logs You will find all information there just by reading it. |
thanks for the details.. For restore - As the backup files are accessible locally, do i have to use hardlinks? why do i have to specify download? is there a different option to just copy snapshots files ? Also to restore - Should the cassandra service be running or stopped ? |
Yes you have to use hard links, download will download it to some dir different from cassandra dir and then it will hardlink it to target cassandra dir. Sure you have to specify download if you want to download them. Please go once again over examples, there is example of hardlinking importing, 4 commands, download, truncate, import, cleanup - this is in case you have Cassandra running. In case it is not running, you have to use in-place strategy. If you want to restore on a running cluster, you have to do it in connection with Icarus (our other project), Esop can restore just that one Cassandra node, not whole cluster, but you can still choose if you want that to restore on a running node or on stopped. |
Thank you.. I am following the same steps to restore...still get this error 14:36:43.609 ERROR com.instaclustr.operations.Operation - Reporting errors for operation 002ac5c6-3dde-4dfc-9aa1-54ce61f9e986 I do have 'test' keyspace created here is my restore script looks echo " Then we need to truncate keyspace" echo " we can make hardlinks from directory" echo " Lastly we can cleanup downloaded data as well as truncated" |
What is the content of "/var/lib/cassandra/data", list me directories of that directory please. Internally, I am appending automatically "data" to "--data-directory" so if you specified "/var/lib/cassandra/data", I will append "data" to it so I am about to parse "/var/lib/cassandra/data/data" so I expect keyspace "test" to be there. If you have "/var/lib/cassandra/data/test", then it can not find it I would say, so you might try "/var/lib/cassandra" instead as when I append "data" to it, it will be "/var/lib/cassandra/data/test" and that might be what you have. |
Thanks.. I have tried '--data-directory=/var/lib/cassandra' also - same error. root@cassandra-0-seed:/var/lib/cassandra# ls -l root@cassandra-0-seed:/var/lib/cassandra# ls backme/ root@cassandra-0-seed:/var/lib/cassandra# ls data |
I think 'test' keyspace directory is missing but cqlsh shows it is there... not sure why root@cassandra-0-seed:/var/lib/cassandra/data# cqlsh -e "desc keyspaces" root@cassandra-0-seed:/var/lib/cassandra/data# ls |
Yes so as I said, you have "--data-directory=/var/lib/cassandra/data", but I add one more "data" at the end so it is --data-directory=/var/lib/cassandra/data/data but you do not have it. So setup only this --data-directory=/var/lib/cassandra (without "data" at the end). The fact that you have test keyspace but it is not in data dir is very wrong. I would just start from scratch. |
Does this tool support backing up data from Cassandra docker container?
I am getting this error -
com.google.inject.CreationException: Unable to create injector, see the following errors:
while locating com.instaclustr.kubernetes.KubernetesApiModule$ClientCoreV1ApiProvider
at com.instaclustr.kubernetes.KubernetesApiModule.configure(KubernetesApiModule.java:23) (via modules: com.instaclustr.esop.guice.StorageModules -> com.instaclustr.kubernetes.KubernetesApiModule)
while locating io.kubernetes.client.apis.CoreV1Api
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.instaclustr.esop.cli.Esop.init(Esop.java:102)
at com.instaclustr.esop.cli.BackupApplication.run(BackupApplication.java:63)
The text was updated successfully, but these errors were encountered: