datBase icon indicating copy to clipboard operation
datBase copied to clipboard

Unpublish a duplicate dat

Open CristianCantoro opened this issue 5 years ago • 5 comments

I have done a dat publish two times on the same dat with different titles and I have got this:

  • https://datbase.org/CristianCantoro/wikipedia-pagecounts-ez
  • https://datbase.org/CristianCantoro/pagecounts-ez

I would like to eliminate one of them.

CristianCantoro avatar Dec 13 '18 02:12 CristianCantoro

(Not tested but...) can you run dat unpublish --name pagecounts-ez ?

joehand avatar Dec 13 '18 17:12 joehand

Oh nope, that won't work. If you cd data-dir and then dat unpublish it will unpublish whatever name is in the dat.json file. So you can set it to the one you want to unpublish then run it. If that makes sense... ?

Sorry, this should be more straightforward!

joehand avatar Dec 13 '18 17:12 joehand

@joehand said:

Oh nope, that won't work. If you cd data-dir and then dat unpublish it will unpublish whatever name is in the dat.json file. So you can set it to the one you want to unpublish then run it. If that makes sense... ?

Ok, I will try doing that, but I would like to point out that at the moment dat unpublish is undocumented.

This is what I get with dat 13.11.4:

$ dat --help

Usage: dat <cmd> [<dir>] [options]

Sharing Files:
   dat share                   create dat, import files, share to network
   dat create                  create empty dat and dat.json
   dat sync                    import files to existing dat & sync with network

Downloading Files:
   dat clone <link> [<dir>]    download a dat via link to <dir>
   dat pull                    update dat & exit
   dat sync                    live sync files with the network

Info:
   dat log                     log history for a dat
   dat status                  get key & info about a local dat

Dat public registries:
   dat <cmd> [<registry>]      All commands take <registry> option
   dat register                register new account
   dat login                   login to your account
   dat publish                 publish a dat
   dat whoami                  print active login information
   dat logout                  logout from active login

Stateless/Shortcut Commands:
   dat <link> [<dir>]          clone or sync link to <dir>
   dat <dir>                   create and sync dat in directory

Troubleshooting & Help:
   dat doctor                  run the dat network doctor
   dat help                    print this usage guide
   dat <command> --help, -h    print help for a specific command
   dat --version, -v           print the dat version

  
General Options:
    --dir, -d             set the directory for Dat
    --port                port to use for connections (default port: 3282 or first available)
    --utp                 use utp for discovery (default: true)
    --http                serve dat over http (default port: 8080)
    --sparse              download only requested data (default: false)
    --up                  throttle upload bandwidth (1024, 1kb, 2mb, etc.)
    --down                throttle download bandwidth (1024, 1kb, 2mb, etc.)

Have fun using Dat! Learn more at docs.datproject.org

CristianCantoro avatar Dec 14 '18 10:12 CristianCantoro

I have issues with dat unpublish (it's throwing errors at me), I will investigate and open a separate bug report if needed.

CristianCantoro avatar Dec 14 '18 11:12 CristianCantoro

At the moment I am not able to run dat unpublish (see the bug referenced above)

CristianCantoro avatar Dec 19 '18 16:12 CristianCantoro