Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support: How to restore accidentally deleted docker-compose.yml file #1436

Open
satoshinotdead opened this issue May 26, 2024 · 7 comments
Open

Comments

@satoshinotdead
Copy link

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.

@pirate
Copy link
Member

pirate commented 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)

@satoshinotdead
Copy link
Author

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.

@pirate
Copy link
Member

pirate commented May 28, 2024

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

@satoshinotdead
Copy link
Author

satoshinotdead commented 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.

@pirate
Copy link
Member

pirate commented 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?

@satoshinotdead
Copy link
Author

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.

@pirate
Copy link
Member

pirate commented 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

@pirate pirate changed the title How to backup docker instance? Support: How to restore accidentally deleted docker-compose.yml file Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants