I can get content into ipfs just fine. Whats a mystery is how long I can expect it to stay around. I know that more requests will increase the lifetime, but what I’m looking for is a summary of the rules for expiration of content.
For example, if I ‘ipfs add picture.jpg’ (not pinned), how long does it stay available?
If someone requests picture.jpg, does that always mean the image has been copied to a remote ipfs server? What are the expire times for the copy of the picture on that server?
My use case is to keep metadata (a json blob) of each of the many cryptocoins out there, as a public reference for apps and tools that need it. Before I can think about doing that, I need to get a good idea of how long data stays in ipfs and after much looking, I havent found any FAQ or rules on this. Thanks!
Assuming your node is the only one with the file, it stays available until your node’s garbage collector runs. Currently, garbage collection is not automatic by default so it’s only run when requested.
picture.jpg is requested via its IPFS hash, then it is copied to any node that requested it. There are no guarantees about “expiry” time since it depends on whether anyone else has pinned it and how often garbage collection is running on the remote nodes (if at all).
Thanks thats helpful info. If the default is to not run the garbage collector, then is there is a default limit to the amount of disk space used?
Where are the garbage collector configurations? I looked through ~/.ipfs/config and config-v5 (whats the difference?) and found nothing that looks to be related to garbage collection.
Yes, 10GB. However, storage limits aren’t currently respected and are only used for triggering automatic garbage collection when the
--enable-gc option is passed to
ipfs daemon to enable periodic garbage collection.
You can set the max desired repo storage size by changing this line in the config:
The GC interval is specified on this line.
I think the v5 config is a backup that is kept during an IPFS upgrade when the config version is updated. I’m guessing your current config version is version 6.