diff --git a/webapp/app.jsx b/webapp/app.jsx index eb74cf2..757a5b8 100644 --- a/webapp/app.jsx +++ b/webapp/app.jsx @@ -35,6 +35,7 @@ require.ensure('react', _ => { var PostEditor = require('post-editor.jsx')(boards) var Status = require('status.jsx')(boards) var Update = require('update.jsx') + var Backup = require('backup.jsx') // Define Main Components @@ -123,6 +124,8 @@ require.ensure('react', _ => { + + diff --git a/webapp/pages/backup.jsx b/webapp/pages/backup.jsx new file mode 100644 index 0000000..7323472 --- /dev/null +++ b/webapp/pages/backup.jsx @@ -0,0 +1,41 @@ +var React = require('react') +var Icon = require('icon.jsx') + +module.exports = React.createClass({ + render () { + return
+
+

+

Backup and Restore

+
+

A user's profile is just a folder with a bunch of other files and + folders. This makes it very easy to create backups of anyone's profile, + not just yours.

+

Restoring is also very easy: once you have the profile folder, just + add it to IPFS and then use the resulting hash to restore your profile. + Only restoring manually is possible, because I haven't implemented + assisted restore yet but that's coming soon.

+
+

+

Backing Up

+
+

Get the IPNS address of the user you want to back up. For example, while visiting + /@userid, userid would be what you're looking for.

+

If you have a profile, click on the icon in the top bar to view your address.

+

Make sure you are running a full go-ipfs node on your machine. Then, run this command: ipfs get /ipns/userid/ipfs-boards-profile/ where userid is the target user's IPNS address.

+

A folder named ipfs-boards-profile will be created in the current working directory, containing the full profile with everything that is being published by the user. It's that simple.

+
+

+

Restoring

+
+

Start the IPFS node you want to use to publish your profile.

+

Get the IPFS hash of the ipfs-boards-profile folder that you want to use.

+

If you have a folder on your system, you can add it ipfs using ipfs add -r folder where folder is the path to your folder.

+

Run this command to dangerously delete any existing profile: ipfs files rm /ipfs-boards-profile

+

Run this command to copy the new profile in place: ipfs files cp /ipfs/hash /ipfs-boards-profile

+

Now check the hash of your mfs by running ipfs files stat /. Also check using ipfs files ls / to see that there's nothing you wouldn't want to publish.

+

Publish your mfs containing your profile to IPNS using ipfs name publish /ipfs/hash where hash is the hash returned by the ipfs files stat / command

+

Note: soon, you'll be able to restore from IPFS just by clicking a button!

+
+ } +}) diff --git a/webapp/pages/profile-editor.jsx b/webapp/pages/profile-editor.jsx index bd45e90..b1a8483 100644 --- a/webapp/pages/profile-editor.jsx +++ b/webapp/pages/profile-editor.jsx @@ -102,6 +102,7 @@ module.exports = function (boardsAPI) { View + Backup and Restore ) diff --git a/webapp/pages/update.jsx b/webapp/pages/update.jsx index ba18366..cbe0d57 100644 --- a/webapp/pages/update.jsx +++ b/webapp/pages/update.jsx @@ -4,7 +4,7 @@ var Icon = require('icon.jsx') module.exports = React.createClass({ render () { var gateway = window.location.pathname.indexOf('/ipfs/') === 0 || window.location.pathname.indexOf('/ipns/') === 0 - return
+ return

Version Center

diff --git a/webapp/style.css b/webapp/style.css index f68a86a..75046ba 100644 --- a/webapp/style.css +++ b/webapp/style.css @@ -32,6 +32,10 @@ a { margin-top: .5em } +.thin { + max-width: 60rem +} + .center-block { margin:auto; display:block;