How to instantly copy a directory or website

Blank 4/9/2019 09:16 - 4/9/2019 09:16
Website Management

This technique allows you to instantly make a perfect copy of a directory, which could be in another repository or even account.

It uses Kademi's cryptographic filesystem which uses digital "fingerprints" to identify directory content.

By setting the fingerprint you make the content exactly the same as the original.

There's two similar features:

  • Copy a directory within a repository (eg within a website)
  • Copy an entire repository (usually a website)

Copy a Directory

Copy an entire website

You can apply a hash (ie a digital fingerprint) to an entire website on the repository history page. This is basically the same as the video above, except you use a different screen to set the hash:

First find and copy the hash you want to set:

undefined

Then in the account you want to copy to, go to the website manager and click through to the history page:

undefined

Then, from the history page, first click the "set hash manually" button to show the set hash panel.

And finally click the "set hash" button:

undefined

 

Using Remote Hash to copy a website or directory from a different cluster

If you are moving a website from another cluster, there are a few extra steps we need to do.

First, we need to make sure we have a Profile with a password on the source account in the source cluster.

We also need to make sure that profile has the AdminViewer and Content Viewer Roles applied to their Primary Group.

undefined

The group should then look something like this.

undefined

 

You'll then want to navigate to the destination account (in this case, the QA account). Click on Website Manager > Websites and then select the destination website. We recommend creating a new version of the website if you are on production.

Next, click on History which will take you to the commits page for this website. 

undefined

You should then be presented with this screen which will list all the recent commits and their hash. For now, we want to click on the Set hash manually button.

undefined

You should now be presented with further options. Click on Set remote hash.

undefined

This will bring up a modal where you can now enter details about the source account you are copying from.

undefined

For our first step, we'll want to login to the source account. Start by entering in the admin domain URL, then clicking on the Log into remote server button. If you aren't already logged in, you will be prompted to enter your username and password as well as 2FA if you have it enabled. Login to the profile that we set up earlier.

undefined

The next step is to enter in the Hash for the commit you want to copy over. On the source account, navigate over to the commits page for the website you want to copy over following the same steps as before: Website Manager > Websites > Select the website you want to copy > History. Then copy the hash for the commit you wish to copy over.

 undefined

Paste the hash that you copied into the Hash field and then click on Set Remote Hash. This should start up a background task that will copy over the website.

And that's it. You should now have a copy of the website from the source in the destination account.