Skip to content
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

Run command in actual container to backup #31

Open
smurfy opened this issue Feb 13, 2018 · 4 comments
Open

Run command in actual container to backup #31

smurfy opened this issue Feb 13, 2018 · 4 comments

Comments

@smurfy
Copy link

smurfy commented Feb 13, 2018

Currently as far as i gathered from the code, the DUMP commands start a separate container and then execute commands in it.

What i need and which possible can fix / workaround #26 would be the ability to run actual commands in the "tagged/labeled" container.

For example i have an ejabberd container. With a command, i could dump the database somewhere, set the correct permissions to the dump file and add the file to /backup of rancher-backup.

I could also run a rsync or something of other data to /backup without actually mounting the data themself. (to fix the permission problem)

@disaster37
Copy link
Owner

It's fix on webcenter/rancher-backup:develop. Read #26 comment for more detail.

@smurfy
Copy link
Author

smurfy commented Feb 19, 2018

Well not really, while the permission problem is fixed, the other benefit of a way to do docker exec on the actual container for dumping still exist.

As a mentioned before i have a ejabberd container where remote backup (like with databases) is not really possible. So i need to run a command:

docker exec CONTAINER ejabberdctl backup /opt/ejabberd/backup/ejabberd.backup

to do the backup, instead of creating a dump container

Hope you understand what i mean :)

@disaster37 disaster37 reopened this Feb 25, 2018
@disaster37
Copy link
Owner

I doesn't know ejabberd, but there are a problem with docker exec command. To do work, the backup container will be run on same host of your ejabber container...

Maybee another way is to add same some tools on your ejabber image like gocron to perform backup each hours or days on distributed storage. And them mount the same distributed storage on backup container ?

@smurfy
Copy link
Author

smurfy commented Feb 26, 2018

Ok thank you, i run everything on the same host, so i never thought about docker exec can be a problem. But whats about rancher-cli?

http://rancher.com/docs/rancher/v1.6/en/cli/commands/#rancher-exec-reference

But since ejabberd supports mysql as backend, i probably will migrate, so i can use the default mysql dump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants