If your node storage is higher than expected, the methods listed below can help free up space on your node.

Removing unnecessary ArangoDB artifacts

The node backup and restore procedure used to leave unnecessary data on your node. This data is safe for you to remove by entering your node container with the following command:

docker exec -it otnode bash

Then removing the ArangoDB artifacts with:

rm -rf /ot-node/data/arangodb

Type exit to exit the container then check your node storage.

Removing unnecessary node update artifacts

The node auto-update process can leave unnecessary data on your node. This data is safe for you to remove by entering your node container with the following command:

docker exec -it otnode bash

Then removing the artifacts with:

rm -rf /ot-node/current/data-migration

Type exit to exit the container then check your node storage.

Removing old node backups

If you have done multiple backups of your node you can remove old backups and keep the latest ones. First check your server for existing backups with the following command

ls -la backup

You might get a response similar to the example below

drwxr-xr-x 4 root root 4096 Mar 22 16:26 ./
drwx------ 9 root root 4096 May 18 12:45 ../
drwxr-xr-x 4 root root 4096 Jun 8 2020 2020-06-08T11:05:41.595Z/
drwxr-xr-x 4 root root 4096 Mar 22 16:26 2021-03-22T16:26:13.731Z/

Then check which backups you have inside your container with:

docker exec otnode ls -la /ot-node/backup

You might see that there are newer backups inside your node container, for example

drwxr-xr-x 4 root root 4096 Mar 22 16:26 ./
drwx------ 9 root root 4096 May 18 12:45 ../
drwxr-xr-x 4 root root 4096 Jun 8 2020 2020-06-08T11:05:41.595Z/
drwxr-xr-x 4 root root 4096 May 12 13:03 2021-05-12T13:03:24.303Z/

If you don't have the latest backup outside your node, extract it with:

docker cp otnode:/ot-node/backup/2021-05-12T13:03:24.303Z

(substitute 2021-05-12T13:03:24.303Z with whichever timestamp is the latest for you)

In this example it would be safe to remove the 2020-06-08T11:05:41.595Z and 2021-03-22T16:26:13.731Z backups with the following commands:

rm -rf backup/2020-06-08T11:05:41.595Z
rm -rf backup/2021-03-22T16:26:13.731Z

After you've deleted the backups outside your node, you can also delete node backups that are inside your node container. You can do so by first entering your node container with the following command:

docker exec -it otnode bash

Then remove the entire backup folder with

rm -rf /ot-node/backup

Type exit to exit the container then check your node storage.

Prune your docker system

Warning: Only run this command while your node is running, otherwise it will delete your node

The command below can sometimes help to remove unused docker data

# WARNING: Only run this command while your node is running, otherwise it will delete your node. If you made sure that your node container is running, remove the # and run the command below
# docker system prune -a -f

Restart your server

Restarting the server your node is running on might increase your available disk space. After your server is restarted make sure to start your node again with:

docker start otnode

Do a clean install of your node

If nothing else helps, you can back up your node data, then delete your node and download and restore it. You can find detailed instructions about this process on our Documentation page

We hope these strategies helped you increase available space on your node.

Did this answer your question?