vmware-archive / cfops

This is simply an automation that is based on the supported way to back up Pivotal Cloud Foundry
http://www.cfops.io
Apache License 2.0
35 stars 24 forks source link

Backup PCF Tiles using cfops #40

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hey guys,

If we wanted to back up CF tiles using the cfops command line tool, how can we achieve that?

I'm using cfops 2.0:

https://github.com/pivotalservices/cfops

First off I'd like to list the tiles, but for some reason the same syntax as the backup command isn't working.

This is the backup command that we're using:

/opt/cfops_linux_amd64/cfops --logLevel="debug" backup --opsmanagerhost 10.114.129.10 --adminuser pcfadmin --adminpass secret --opsmanageruser ubuntu --opsmanagerpass secret -d /var/www/backup/pcf-backup/prod-backup/backup-$now --tl 'opsmanager, er'

And this is the list-tiles command that I'm trying to use unsuccessfuly:

./cfops list-tiles --opsmanagerhost 10.114.129.10 --adminuser secret --adminpass secret --opsmanageruser ubuntu --opsmanagerpass secret

Incorrect Usage.

NAME: ./cfops list-tiles - shows a list of available backup/restore target tiles

USAGE: ./cfops list-tiles [arguments...]

How can I use both this command and the command to backup tiles?

xchapter7x commented 8 years ago

the list-tiles command in cfops will not list the tiles on your system, it will list the tiles cfops supports running a backup/restore on. Since it is just a listing of what cfops itself supports you do not need to pass it any other flags. Doing so will result in an error, b/c it is not expecting any flags, which is what you are seeing.

the --tl flag that you are using in your example of the backup command you ran, is not a supported flag for a v2.x cfops. That is a flag only supported in the previous v1.x of cfops. Please see the README file in the repo (https://github.com/pivotalservices/cfops#usage-cfops-v2xx) for v2 usage or the help output from the cfops command itself.

Let me know if you have any other questions. Also, feel free to ping us for help directly in the gitter channel for a faster feedback loop Gitter

ghost commented 8 years ago

Hi,

Thanks for your response! Where are are you supposed to run cfops? Are you supposed to run it on a particular VM such as the ops manager or ops director?

Thanks, Tim

sneal commented 8 years ago

@bluethundr You can run it on any machine that can access the opsmanager host via SSH.

ghost commented 8 years ago

Oh, so cfops only lists the tiles that it can backup with the cfops list-tiles command. And the only tiles that it can back up are the ops-manager and elastic-runtime tiles?

Thanks

xchapter7x commented 8 years ago

cfops only natively supports ops-manager and elastic-runtime. a beta feature exists for plugins. this would allow you to support any tile you wish via writing a plugin.

this feature will be exposed by default and added to the docs in a coming release.

ghost commented 8 years ago

@xchapter7x ok!! Sounds good. Thanks for the info!