Moving from Rackspace's Cloud Files to Storj. Any way to migrate via code and PHP application?

I am moving a good amount of files from cloud files to Storj. I got the CLI interface to upload files.

After I upload it using the CLI, I don’t see it in the web interface in the bucket I uploaded it to. Why is that?

By using commands like “uplink share --url --not-after=none sj://bucket/file”
I am able to get the download link of the file, is there an easier way to access the file since i don’t see it in the web interface.

Is there a way to run these CLI commands in my PHP Application via code? I have an application that usually uploads to rackspace, I want it to use Storj instead.

First I have to migrate the existing files over to storj and get the download link to replace it in the application’s database.

I’m pretty new to using only CLI to do this, is there any way you can point me in the right direction?

Hi @elm_storage,

Whilst I’m not the most knowledgeable I believe this normally relates to the access grant and encryption key, from the CLI, being added to the web interface. Without that information the web portal can’t read the content of the buckets.

There is an uplink library for PHP:

This part specifically. You can use a different access grant as long as you use the same encryption pass phrase.

1 Like

Or the other way around. If you use a different encryption key the bucket will look empty.

Thank you! I don’t think I used the “encryption passphrase” when uploading objects via the CLI, is there an option for that? I didn’t see that in the documentation.

I can see the bucket I created via CLI, but I can’t see the file uploaded… I’ve always used the same encryption passphrase when viewing the buckets using the web interface.

How did you setup uplink CLI? If you run the setup with an API key it will ask you for a passphrase. Maybe you typed in the password for your satellite account?

We see this quite a bit. It’s important when creating the access grant and setting the encryption key that you enter that same encryption key in the object browser, your files will then be visible as the object browser will be able to decrypt them.

Where you Set the Encryption Key when creating the access grant
image

Where you enter the same encryption key to view data

2 Likes

Thanks for the response, really appreciate it!

When does it ask for the passphrase in the CLI interface? can you point me to that documentation? I don’t remember seeing that. I think there was a satellite address and API key, but no passphrase when dealing with the CLI.