Backing up your assets library locally

In this tutorial, we will explain how to synchronize your assets library with your local Foundry installation.

Note: This synchronization is only done one-way. It currently downloads your assets library to the local folder. It will not sync your local folder to your Forge installation. The Asset Sync feature is intended as a way to backup your assets, and as a way to retrieve assets uploaded to The Forge.

If you want to synchronize your local assets to your assets library, use the Import Wizard. We use the term “synchronization” because, after the initial download of your assets, only new and changed assets will be re-downloaded. This helps keep the synchronization faster than a full re-download.

The synchronization tool currently has other limits, as well. For security reasons, Foundry will not let you overwrite local files that are not media files, so a file with no extension or a .js file, etc… will not be overwritten. This should not be an issue as the assets library is meant primarily for media files (audio, video, images), so you will rarely encounter that issue.

Similarly, the synchronization tool will not overwrite existing local files, unless you tell it to. If it detects that a local file matches the remote file, changing the name of the file in your assets library, and redoing a synchronization will update the local file as well. If both the local and remote file have changed, the file will not be overwritten.

How to synchronize your assets library

1 - Install and enable the Forge VTT module to your local Foundry installation
2 - Set your API key in the Forge module’s settings. Refer to this guide on how to do this. Note that you would only need the ability to read assets in the API key permissions.
3 - In the same module settings window, open the Asset Sync Tool by clicking the “Open Asset Sync” button:

image

4 - Click the Sync button and let it begin working:

image

If you make changes to your assets library after syncing it to your local Foundry folder, all you will need to do is open the sync tool and re-sync them again. After the first sync, it will (usually) be faster and more efficient in subsequent syncs. In the future, the asset sync will allow you to update your worlds as well, allowing you to export your content more easily, and play offline.

2 Likes

Looking forward to the local world asset re-point, that’ll be great too.

2 Likes

Hey there,

  • is there a milestone set fot updating the world?
  • Do I have to resync completely (forced) to activate the later coming use of Local Assets
  • 181/11779 assets and I started like 15 minuets ago. Be patient everybody :slight_smile:

Very nice feature I was looking forward to. Thanks!

Hi,

  • There’s no specific deadline set for it (I stopped doing deadlines, I always miss them, stress over them, and feel bad), but it’s for sooner rather than later.
  • Yes, you would resync but this is an assets sync not an assets download, and it took a while to write because we wanted you to be able to do the sync multiple times and it would just pick up any changes, without redownloading anything that hasn’t changed, so technically, the next time you do a sync, it should only take a few seconds to complete.
  • Yeah, initial sync can take a while, depending on how big your assets library is, hehe. We could probably optimize the download/upload portions to have it parallellized, but that’s a lower priority than other stuff.

Thanks!

Hey kakaroto, Alright sounds good to me. Thanks again for the (again fast) response. Have a nice weekend. After the 0.8.6 release I’m sure it’s a quite one :sweat_smile:

Hi!
An update to the Forge module was released a couple of days ago which adds support for the updating of worlds. It will also attempt to migrate entities in compendiums in your enabled modules, so hopefully the world becomes fully usable offline (unless it’s using references to someone else’s asset library or external links).
Please test it and let us know if you have any issues or feedback!
Thanks!

Hi!
Yeah, I’m now on story teller mow and uploaded (some) more assets now. Sooo I’m syncing another 30k assets right now and will test afterwards. Probably Saturday.
Will post any issues here or on discord.
Edit: with the speed of the sync right now it’ll be 25 hours till completion of the process. It’l be sunday or monday :sweat_smile:
Okay it skipped like 28k assets i synced earlier. The new feature synced with errors (expected ones). It shows the modules that the scene was using on the forge, but are not installed locally and shows external links as errors. Seems like it works as intended.

Console: Screenshot - 71c3d63396be29a9163975f2fc54ce18 - Gyazo

1 Like

I’m having trouble using this module. When I install it, I only see an entry field to enter the API Key and there’s no button to “Open Asset Sync”. I’m running Foundry VTT 0.7.9 via forge-vtt.com. In case it’s important, I’m not a Forge patreon, but I do have a paid forge account.

Here’s what I see in the settings:

I’ve tried entering an API key and restarting the game, but the Forget settings are the same (can only enter API Key with no Open Asset Sync button).

I initially tried using the 1.11.0 version of The Forge module and then uninstalled that and install the 1.10.2 version, but both looked the same in the Foundry module settings.

That option is only available when you run the Foundry app locally or on a server that isn’t hosted on the Forge, since you cannot sync your Forge assets to the Forge itself (all the assets are already there!).

That’s what I was missing, thanks!

Seemed to work pretty good and fast (I have a fast connection).

I know you eventually want to provide 2-way sync for assets. I’m wondering if you’re considering doing the same for modules & settings. In my ideal world, I’d love to develop/configure everything about my world locally and then push all my changes to Forge when I’m ready to play with my group.

That’s what the import wizard does. It’s used for syncing back in the other direction, from local back into the forge.

I’m using “Update Foundry World & Compendiums to use Local Assets.” Synchronization is happening now as I type this. Just so I understand the process:

  1. Asset Sync accounts all the world’s stat blocks, compendiums, etc.
  2. Asset Sync compares every local asset to the accounted references and updates each reference to match the assets’ local position.

Is my assumption correct? I wonder because the process shows a systematic “[asset file] saved to [local asset directory]” and I know each of those files already exist. Asset Sync is not overwriting the same file, is it? I presume no, so I suppose it’s actually comparing each and every asset to file references and syncing (changing forge.vtt references to local) as it goes.

Synchronization is complete and result is outstanding! The process took a long time, given how many files I have, and I’m thankful for the automation.

However, I noticed most (maybe all) items from compendiums still refer back to the Forge:
Screen Shot 2021-09-06 at 12.35.07 PM

In this example, my local installation has systems/dnd5e/icons and all the same files. I thought Forge synchronization updates compendium files too, no?

I will report this back.
I recently noticed this with spaced folders, but seems you’ve gotten it on a non-spaced world too.