4 ms·
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.
by troyjfarrell 3y ago
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.
- dmw_ng 3y agoYou can also pass special commands in the second argument to SQLite: sqlite3 db .dump | ...
- rsync 3y agoThanks! I have added that one-liner to the remote commands page: https://www.rsync.net/resources/howto/remote_commands.html https://www.rsync.net/resources/howto/remote_commands.html ... although based on some of your siblings, I changed .dump to .backup ...
- JNRowe 3y agoSadly, 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.
- rsync 3y agoFixed. Thank you.