Backup and restore scripts

5 views
Skip to first unread message

Noah

unread,
Dec 8, 2008, 10:55:56 PM12/8/08
to PBwiki API Hackers
Hello.

I am wondering if full-backup and restore scripts can be written with
the API facilities currently available. The GetFile function is not
implemented yet, but I am imagining a script that will allow full
backup of HTML and files (pdf's, images, etc) and restore if the wiki
ever loses all its data.

How close is the API to allowing that kind of facility?

Has anyone written scripts to allow backup and restore that includes
both HTML and files and images?

Thanks,

-Noah

Mark Christian

unread,
Dec 10, 2008, 2:29:11 PM12/10/08
to noahj...@yahoo.com, PBwiki API Hackers
Hi Noah;
PBwiki already offers backups of your wikis. Click Backup under Wiki
Settings. Right now, the backups we offer don't include files, but
fixing that is on our roadmap.

If you'd like to write your own backup scripts, however, the API calls
we have should certainly be sufficient (minus the GetFile method, as
you mentioned).

Cheers;
— Mark

Tim

unread,
Dec 11, 2008, 5:29:22 PM12/11/08
to PBwiki API Hackers
If you're using some kind of http transport already to use the API, is
there a reason that you'd need to use getfile rather than just... you
know.. getting the file (by plugging the URL to the file into the
browser, after having the file enumerated for you through the script?)

Noah

unread,
Dec 16, 2008, 7:10:06 PM12/16/08
to PBwiki API Hackers
Well, I could script the browser, I think firefox offers means to do
it, but I'd like a cleaner solution. We're talking about a lot of
files, 50 or so, images, pdf, graphviz source files, and a few text
files.

> If you're using some kind of http transport already to use the API, is
> there a reason that you'd need to use getfile rather than just... you
> know.. getting the file (by plugging the URL to the file into the
> browser, after having the file enumerated for you through the script?)

-Noah

Mark Christian

unread,
Dec 17, 2008, 12:28:37 AM12/17/08
to PBwiki API Hackers
Sounds like you're better off using the API to get the files. Use
GetFiles to get a list of all the files and then download the files
with GetFile.

Noah

unread,
Dec 17, 2008, 10:24:13 PM12/17/08
to PBwiki API Hackers
Right, so as soon as you guys can make getfile available (the v2 api
docs still show it unavailable), I'll try to implement exactly that, a
list, then a bunch of getfile uses. Meanwhile, thanks for a great
wiki!

-Noah

On Dec 16, 9:28 pm, "Mark Christian" <mark.christ...@pbwiki.com>
wrote:
> Sounds like you're better off using the API to get the files. Use
> GetFiles to get a list of all the files and then download the files
> with GetFile.
>

Mark Christian

unread,
Dec 18, 2008, 12:21:27 AM12/18/08
to PBwiki API Hackers
Ah, of course, I'd forgotten that GetFile wasn't available yet. I
spent some time working on that this evening, so hopefully it will be
out soon.

Cheers;
— Mark

Mark Christian

unread,
Dec 18, 2008, 6:29:59 PM12/18/08
to PBwiki API Hackers
Okay, folks, GetFile is now live. Sorry about that.

If your GetFile request is successful, we'll send a
Content-Disposition header with the filename, followed by the data (as
you'd expect). If not, we'll send a standard API response.

— Mark
Reply all
Reply to author
Forward
0 new messages