A modified version of Wafrn used on https://wf.jbc.lol (mirror of https://git.jbc.lol/jbcrn/wf.jbc.lol which is a mirror of https://codeberg.org/jbcarreon123/wf.jbc.lol)
1# Importing content
2
3If you are running a self-hosted instance (or if the instance owner allows you) you can import content from various backup sources. Imports are only provided on a best-effort basis, and it is **strongly** advised to create a backup of your instance before trying to run imports, so you can roll them back if there are any issues
4
5## Importing ActivityPub backups
6
7You can import backups in the ActivityPub backup format, for example the ones that you can obtain from Mastodon's export function. The import will only import the posts and the attached media files from the backup. It will not import your blog settings. The import will also try to import the entire conversation chain of your posts - given those posts still exist in their original location. The backups usually don't contain these resources, so if these are gone from the internet then these threads will be incomplete. When importing a backup created using Wafrn, and the all-inclusive option is chosen the import will import them from the backup file instead of obtaining them fresh from the internet however.
8
9To import follow the steps:
10
111. You need to create the user on the instance that will hold the posts. The importer will not change this user, so you'll have to manually set up the avatar, headers, and description.
12
132. Start up the backend. The workers need to be running during import, otherwise the import will hang. When importing data containing Bluesky threads you'll also need to have the Bluesky integration running.
14
153. Run the following command:
16
17```sh
18cp <filename.zip> packages/backend/uploads
19docker exec -ti wafrn-backend-1 npm exec tsx utils/maintenanceTasks/importActivityPubBackup.ts uploads/<filename.zip> <local_username>
20rm packages/backend/uploads/<filename.zip>
21```
22
23for example if your backup is called `archive.zip` and the user you created locally is `awesomeuser`:
24
25```sh
26cp archive.zip packages/backend/uploads
27docker exec -ti wafrn-backend-1 npm exec tsx utils/maintenanceTasks/importActivityPubBackup.ts uploads/archive.zip awesomeuser
28rm packages/backend/uploads/archive.zip
29```
30
31## Importing Tumblr backups
32
33There is a [separate project](https://github.com/sztupy/tumblr-tools) allowing you to import your Tumblr blog over to Wafrn.