You might be interested in exporting and importing visualizations because of several reasons:

Backup purposes.

Moving visualizations between different hosts.

Moving visualizations between users.

Using the same visualization with different data.

With cartodb:vizs:export_user_visualization_json task you can export a visualization to JSON, and with cartodb:vizs:import_user_visualization_json you can import it. First outputs to stdout and second reads stdin.

Exporting has backup purposes, so it keeps ids. If you want to use this to replicate a visualization in the same server you can edit the JSON and change the ids. Any valid, distinct UUID will work.

It does export neither the tables nor its data. Destination user should have tables with the same name than the original one for the visualization to work. You can change the table names in the JSON file if names are different.