mix storehouse.copy (Storehouse v0.2.0)

Copy Markdown View Source

Copies the files of one store to another (Storehouse.copy_prefix/2), with its progress: to move to another provider, fill a mirror (Storehouse.Mirror), or bring a production account's files into development.

mix storehouse.copy --from MyApp.OldMedia --to MyApp.Media
mix storehouse.copy --from MyApp.Media --to MyApp.DevMedia --prefix accounts/42/

Files the destination has already are skipped, so it can be stopped and run again: it copies only what is missing.

Options

  • --from and --to - the stores, by module.
  • --prefix - the keys to copy, by their start. The default is every file.
  • --concurrency - how many files are copied at once. The default is 4.
  • --verify - read both copies of a file to compare them, where the stores keep no checksum to compare (Storehouse.copy/2).