Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I believe that you can echo the '.dump' command to SQLite.

    echo .dump | sqlite3 db | ssh user@rsync.net "dd of=db_dump"
It worked for me.


You can also pass special commands in the second argument to SQLite:

sqlite3 db .dump | ...


Thanks!

I have added that one-liner to the remote commands page:

https://www.rsync.net/resources/howto/remote_commands.html

... although based on some of your siblings, I changed .dump to .backup ...


Sadly, that doesn't look like it will work. The '.backup' command needs a filename and won't accept '-' or even '/dev/stdout', at least in the version available on Debian it will simply error out with "missing FILENAME argument on .backup".

As noted '.dump' will work in your pipeline, but with the caveats I and others noted elsewhere.


Fixed. Thank you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: