Thanks for your post and sorry you're having this issue with SQL Packager.
I'm not sure SQL Packager is the ideal choice for an automated backup utility. I would recommend using SQL Servers native backup, or a third party backup tool for this job. If you're using SQL Server express and can't schedule a SQL server backup using the SQL Agent, then you could use the command line interface to SQL Server (SQLCmd.exe) and schedule a command line backup using a batch file triggered through a windows scheduled task.
Anyway, with regards to:
Error: Cannot uniquely identify row in table 'foo' because there is no primary key or unique index defined on it. Output script generation failed
I've seen this kind of error before if a table contains rows that only differ by the data in a BLOB column. Could you send me the table structure for table 'foo'?