[GH-ISSUE #1436] Support: How to restore accidentally deleted docker-compose.yml file #3877

Closed
opened 2026-03-15 00:49:08 +03:00 by kerem · 7 comments
Owner

Originally created by @satonotdead on GitHub (May 26, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1436

I accidentally removed my docker-compose files. While I can start from scratch, I have many archived pages that I want to preserve and transfer to my new instance.

What's the best way to achieve this?

My container is currently resetting itself due to missing Chrome credentials. However, I believe the archived files are still present, as I haven't deleted the Docker library folder or the persistent data bound in the docker-compose file.

Originally created by @satonotdead on GitHub (May 26, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1436 I accidentally removed my docker-compose files. While I can start from scratch, I have many archived pages that I want to preserve and transfer to my new instance. What's the best way to achieve this? My container is currently resetting itself due to missing Chrome credentials. However, I believe the archived files are still present, as I haven't deleted the Docker library folder or the persistent data bound in the docker-compose file.
kerem closed this issue 2026-03-15 00:49:14 +03:00
Author
Owner

@pirate commented on GitHub (May 27, 2024):

No special procedure is needed to recover if your data/ folder is intact, simply restart the container with the same version you were using before and it should start up as usual.

(Don't use dev: right now, stick to :stable)

<!-- gh-comment-id:2132482464 --> @pirate commented on GitHub (May 27, 2024): No special procedure is needed to recover if your data/ folder is intact, simply restart the container with the same version you were using before and it should start up as usual. (Don't use `dev:` right now, stick to `:stable`)
Author
Owner

@satonotdead commented on GitHub (May 28, 2024):

Great, thanks!

And what about moving ArchiveBox to another server? That's why I'm trying to re-enable it first, just to ensure everything is properly archived.

<!-- gh-comment-id:2135073498 --> @satonotdead commented on GitHub (May 28, 2024): Great, thanks! And what about moving ArchiveBox to another server? That's why I'm trying to re-enable it first, just to ensure everything is properly archived.
Author
Owner

@pirate commented on GitHub (May 28, 2024):

Nothing special needed, just move the data/ folder and docker-compose.yml, all the application state is inside data/.

<!-- gh-comment-id:2135172381 --> @pirate commented on GitHub (May 28, 2024): Nothing special needed, just move the `data/` folder and `docker-compose.yml`, all the application state is inside `data/`.
Author
Owner

@satonotdead commented on GitHub (May 31, 2024):

Nice, thanks! But I'm still can't enter to the instance in order to verify if everything is OK.

How can I deal with this, when there is no docker-compose.yml or possibility to enter into the container because it's restarting itself?

AttributeError: 'PosixPath' object has no attribute 'split'
[i] [2024-05-31 15:12:56] ArchiveBox v0.7.3: archivebox server --quick-init 0.0.0.0:8000
    > /data

[X] Could not find profile "Default" in CHROME_USER_DATA_DIR.
    /data/personas/Default/chromium
    Make sure you set it to a Chrome user data directory containing a Default profile folder.
    For more info see:
        https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#CHROME_USER_DATA_DIR

    Try removing /Default from the end e.g.:
Traceback (most recent call last):
  File "/usr/local/bin/archivebox", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/archivebox/cli/__init__.py", line 140, in main
    run_subcommand(
  File "/app/archivebox/cli/__init__.py", line 74, in run_subcommand
    setup_django(in_memory_db=subcommand in fake_db, check_db=cmd_requires_db and not init_pending)
  File "/app/archivebox/config.py", line 1390, in setup_django
    check_system_config()
  File "/app/archivebox/config.py", line 1298, in check_system_config
    stderr('        CHROME_USER_DATA_DIR="{}"'.format(config['CHROME_USER_DATA_DIR'].split('/Default')[0]))
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'split'

I tried to modify Archivebox.conf adding the variable CHROME_BINARY = /usr/bin/chromium archivebox version but it didn't work.

PS: I'm archiving public pages so I don't need websites login credentials.

<!-- gh-comment-id:2142485867 --> @satonotdead commented on GitHub (May 31, 2024): Nice, thanks! But I'm still can't enter to the instance in order to verify if everything is OK. How can I deal with this, when there is no `docker-compose.yml` or possibility to enter into the container because it's restarting itself? ``` AttributeError: 'PosixPath' object has no attribute 'split' [i] [2024-05-31 15:12:56] ArchiveBox v0.7.3: archivebox server --quick-init 0.0.0.0:8000 > /data [X] Could not find profile "Default" in CHROME_USER_DATA_DIR. /data/personas/Default/chromium Make sure you set it to a Chrome user data directory containing a Default profile folder. For more info see: https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#CHROME_USER_DATA_DIR Try removing /Default from the end e.g.: Traceback (most recent call last): File "/usr/local/bin/archivebox", line 8, in <module> sys.exit(main()) ^^^^^^ File "/app/archivebox/cli/__init__.py", line 140, in main run_subcommand( File "/app/archivebox/cli/__init__.py", line 74, in run_subcommand setup_django(in_memory_db=subcommand in fake_db, check_db=cmd_requires_db and not init_pending) File "/app/archivebox/config.py", line 1390, in setup_django check_system_config() File "/app/archivebox/config.py", line 1298, in check_system_config stderr(' CHROME_USER_DATA_DIR="{}"'.format(config['CHROME_USER_DATA_DIR'].split('/Default')[0])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'PosixPath' object has no attribute 'split' ``` I tried to modify Archivebox.conf adding the variable `CHROME_BINARY = /usr/bin/chromium archivebox version` but it didn't work. PS: I'm archiving public pages so I don't need websites login credentials.
Author
Owner

@pirate commented on GitHub (May 31, 2024):

It looks like you're on an unstable dev build, can you change the docker-compose.yml image line to use image: archivebox/archivebox:stable, then docker compose pull and try again?

<!-- gh-comment-id:2142962838 --> @pirate commented on GitHub (May 31, 2024): It looks like you're on an unstable dev build, can you change the `docker-compose.yml` image line to use `image: archivebox/archivebox:stable`, then `docker compose pull` and try again?
Author
Owner

@satonotdead commented on GitHub (Jun 1, 2024):

Unfortunately, I lost my docker-compose.yml file. Is there a way to change the image within the container?

Thank you again. I'm also moving the files to a new instance, which might be enough.

<!-- gh-comment-id:2143535646 --> @satonotdead commented on GitHub (Jun 1, 2024): Unfortunately, I lost my `docker-compose.yml` file. Is there a way to change the image within the container? Thank you again. I'm also moving the files to a new instance, which might be enough.
Author
Owner

@pirate commented on GitHub (Jun 1, 2024):

The container itself is ephemeral, there is nothing kept between runs other than whats in ./data. (It's not like a VM where you have to keep track of a whole boot drive worth of files)

You can simply re-download the docker-compose.yml file from https://docker-compose.archivebox.io, put it next to ./data and run it again as you did before.


There is also lots more info on this subject available here, maybe it's helpful:
https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives

<!-- gh-comment-id:2143619661 --> @pirate commented on GitHub (Jun 1, 2024): The container itself is ephemeral, there is nothing kept between runs other than whats in `./data`. (It's not like a VM where you have to keep track of a whole boot drive worth of files) You can simply re-download the `docker-compose.yml` file from `https://docker-compose.archivebox.io`, put it next to `./data` and run it again as you did before. --- There is also lots more info on this subject available here, maybe it's helpful: https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#3877
No description provided.