toy / dump

Rails app rake and capistrano tasks to create and restore dumps of database and assets
MIT License
89 stars 14 forks source link

cap dump:backup:create failed #5

Open jpascal opened 11 years ago

jpascal commented 11 years ago
cap dump:backup:create
 * executing `dump:backup:create'
 * executing `dump:remote:create'
 * executing "cd /home/user/application/current; bundle\\ exec\\ rake -s dump:create PROGRESS_TTY\\=\\+ RAILS_ENV\\=production TAGS\\=remote,backup"
  servers: ["server"]
  [server] executing command
  command finished in 461ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p194' -c 'cd /home/user/application/current; bundle\\ exec\\ rake -s dump:create PROGRESS_TTY\\=\\+ RAILS_ENV\\=production TAGS\\=remote,backup'" on server

dump_command shelljoin?

toy commented 11 years ago

Please test version 1.0.2

jpascal commented 11 years ago

Error gone but not all work correctly.

$ cap dump:backup:create
  * executing `dump:backup:create'
  * executing `dump:remote:create'
  * executing "cd /home/user/application/current; bundle exec rake -s dump:create PROGRESS_TTY\\=\\+ RAILS_ENV\\=production TAGS\\=remote,backup"
    servers: ["server"]
    [server] executing command
    command finished in 7864ms
Tables: 100.0%
20120922121021@backup,remote.tgz
  * executing `dump:remote:download'
  * executing "cd /home/user/application/current; bundle exec rake -s dump:versions LIKE\\=Tables:\\ \\\e\\[1m......\\\e\\[0m\\\e\\[K\\\r\\\e\\]0\\;Tables:\\ ......\\\aTables:\\ \\\e\\[1m......\\\e\\[0m\\ \\>\\ schema_migrations:\\ \\\e\\[1m......\\\e\\[0m\\\e\\[K\\\r\\\e\\]0\\;Tables:\\ ......\\ \\>\\ schema_migrations:\\ ......\\\aTables:\\ \\\e\\[1m\\ 12.5\\%\\\e\\[0m\\ \\>\\ schema_migrations:\\ \\\e\\[1m\\ 25.0\\%\\\e\\[0m\\ \\(ETA:\\ 0s\\)\\\e\\[K\\\r\\\e\\]0\\;Tables:\\ \\ 12.5\\%\\ \\>\\ schema_migrations:\\ \\ 25.0\\%\\ \\(ETA:\\ 0s\\)\\\aTables:\\ \\\e\\[1m\\ 50.0\\%\\\e\\[0m\\ \\>\\ servers:\\ \\\e\\[1m......\\\e\\[0m\\ \\(ETA:\\ 0s\\)\\\e\\[K\\\r\\\e\\]0\\;Tables:\\ \\ 50.0\\%\\ \\>\\ servers:\\ ......\\ \\(ETA:\\ 0s\\)\\\aTables:\\ 100.0\\%\\\e\\[K\\\r\\\e\\]0\\;Tables:\\ 100.0\\%\\\a\\\e\\]0\\;\\\a\\\r'\\\n'20120922121021@backup,remote.tgz PROGRESS_TTY\\=\\+ RAILS_ENV\\=production"
    servers: ["server"]
    [server] executing command
    command finished in 7604ms
$ ls dump/

no versions id directoruy

$ cap dump:mirror:down

Local database not changed...

I try make a path for you if I will be have free time.

toy commented 11 years ago

Something with mixing stderr and stdout. Can you try running cd /home/user/application/current; bundle exec rake -s dump:create PROGRESS_TTY\=\+ RAILS_ENV\=production TAGS\=remote,backup 2> /dev/null and tell what you get as output?

jpascal commented 11 years ago
$ cd application/current
$ bundle exec rake -s dump:create PROGRESS_TTY\=\+ RAILS_ENV\=production TAGS\=remote,backup 2> /dev/null
20120922195614@backup,remote.tgz

output: 20120922195614@backup,remote.tgz

toy commented 11 years ago

This works as it should, can you try to run this command using cap invoke?