Hide Forgot
Description of problem: I'm able take a snapshot without a hitch: rhc-snapshot -a wordpress The resulting wordpress.tar.gz looks fine and extracts just fine. But when I do a restore, I get a tar error: $ rhc-snapshot -a wordpress -r wordpress.tar.gz Password: tar: Option --wildcards is not supported Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help Archive at wordpress.tar.gz does not contain the target application: ./*/wordpress If you created this archive rather than exported with rhc-snapshot, be sure the directory structure inside the archive starts with ./<app_uuid>/ i.e.: tar -czvf <app_name>.tar.gz ./<app_uuid>/ NOTE: This is on Mac OSX. I will try with Windows and Fedora after a demo...
works fine on fedora
Not sure where to store this information but it is good to know that some applications do not migrate across domains very well. For example, Wordpress stores it's App URL within the database so if a user takes a snapshot from domain1 and restores on domain2, their data essentially hosed (useless). In my case, from wordpress-macdomain.rhcloud.com -> wordpress-macfed.rhcloud.com and now it looks like this: http://wordpress-macfed.rhcloud.com
Can't restore on Windows client either: $ rhc-snapshot -a wordpress -r wordpress.tar.gz Password: vostok08 gzip: stdin: invalid compressed data--format violated tar: Child returned status 1 tar: ./*/wordpress: Not found in archive tar: Exiting with failure status due to previous errors Archive at wordpress.tar.gz does not contain the target application: ./*/wordpress If you created this archive rather than exported with rhc-snapshot, be sure the directory structure inside the archive starts with ./<app_uuid>/ i.e.: tar -czvf <app_name>.tar.gz ./<app_uuid>/ This seems to be a different problem as the tar.gz file seems corrupt (e.g., the snapshot produced a bad tar.gz possibly): $ tar -xvf wordpress.tar.gz gzip: stdin: invalid compressed data--format violated tar: Child returned status 1 tar: Exiting with failure status due to previous errors Lastly, this is with the latest rhc client tools as I did an update before running the commands.
There's a similar bug on windows before : https://bugzilla.redhat.com/show_bug.cgi?id=790795
checked with latest rhc (0.87.8) on windows 7 x86 under cygwin environment. cannot reproduce this issue on Windows.
Whether '--wildcards' is required or cannot be used seems to vary by the platform. Windows requires it. MacOSX must not have it.
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/tar.1.html OsX uses BSD's tar. --wildcard might be a GNU extension. A couple of solutions - 1) untar on the server, then we never have to worry about different options for tar 2) get a list of files from the archive, do our own globbing and output a file with a list of files we want to extract, use the -T option to pass that file list to tar.
fixed in git 6538e748e88add96b4395242b04511f2765fca48 I was unable to check on MacOSX as I do not have access to a Mac machine. Works under Linux. Keep an eye out for any regressions though there shouldn't be any.
just a note. Fix was to use gnutar if it exists. gnutar should be installed by default on OsX >= 10.6
checked on rhc-0.90.1, 'rhc app snapshot restore' works fine, and 'rhc-snapshot -r' not works well, will wait for the latest rhc client to test again.
just noticed that rhc-snapshot and rhc app snapshot restore are two separate code paths. If rhc-snapshot -r still doesn't work I can simply port the code from rhc app snapshot restore as they should work the same. Though I am not sure if tar on OS X will work with wildcards.
For sure rhc app snapshot restore won't work on OS X except by pure luck http://docstore.mik.ua/orelly/unix3/upt/ch38_10.htm rhc-snapshot -r should with my fixes (unless gnutar is not shipped with OS X). Can you specify which client you are testing on when commenting. There should be a matrix as such - Windows - Pass Linux - Pass OS X - Fail: <error message> Unix Power Tools book does point to a hack that can be used in place of --wildcard if gnutar is not on OS X by default. The only ref I could find was a list of Open Source tools that apple ships with OS X but that doesn't mean it install it.
verified with rhc-0.90.5 and rhc-rest-0.0.14, issue has been fixed.