Is it possible to reinstall Linux (or distro hop) without losing my Dropbox install? Could I move the Dropbox install to my home folder so it survives the OS install?
All the important login information should just be present somewhere in your home folder. If you back that up and restore it later you should be fine, no need to save the dropbox binary.
If that is no option and you only want to back up dropbox files and nothing else follow the instructions below (I can’t guarantee that they will work, but they should):
Back up the whole system, if something goes wrong you can at least restore to a working state. Read the instructions at least once completely before following them.
Look at the documentation for dropbox to see which files are relevant and need backing up. Its the Dropbox folder with all the files, but will probably be some folders/files in your $HOME too, which store login information. Lets hope that they don’t store some metadata there that will invalidate the config if it’s running on a different machine (to prevent what you are trying to do).
If there is no documentation, you can stop dropbox completely. Look for dropbox processes that don’t get stopped when you stop the GUI with something like
pgrep -f -i dropbox.Once you are sure all dropbox processes are stopped run
inotifywait -r -m ~. That command wont exit unless you stop it by issuing ^C. It will list all filesystem events in your home directory. Now start dropbox and see which files it accesses, those are the files you need to back up. It will probably be one or more whole directories in~/.configand~/.local.Add those files to a tar archive using something like this:
tar cvJf dropbox_config.tar.xz [list of folders...]. Savre the resulting tar file somewhere else, reinstall and extract it usingtar xvJf dropbox_config.tar.xz. Take care to run those commands from the same directory.The dropbox login secrets might also be stored in your system’s keyring, if you are using GNOME, then that will be GNOME Keyring. Open your system’s credential manager and look for stuff related to dropbox. Look for instructions on how to back up and restore those secets. I don’t use that often enough to be able to give you more detailed instructions right now though.
References
- https://www.man7.org/linux/man-pages/man1/tar.1.html
- https://linux.die.net/man/1/inotifywait
- https://linux.die.net/man/1/pgrep
- https://specifications.freedesktop.org/basedir/latest/
Edit:
- backups
- keyring
Omg thank you. I’m gonna try this out tomorrow
Look for instructions on how to back up and restore those secets. I don’t use that often enough to be able to give you more detailed instructions right now though.
This is what you need OP
https://askubuntu.com/questions/907425/how-do-i-back-up-and-restore-passwords-and-keys
Try reinstalling your system in a vm to see what works
Do you mean
- To persist the programs installed across multiple OS installs, or
- To persist the Dropbox login/folders across multiple OS installs?
Option 2, with more emphasis on the login component. My files are safe, but I don’t wanna bother my buddy to 2FA me every time I need to reinstall Linux for whatever reason.
- Having a separate partition for /home might be sufficient since dropbox keeps the login details in ~/.config
- Use a tool like rclone and run sync manually. Can backup the API key post the in-browser login. If you spend extra effort, you can create a systemd file to automate this as well
You can generally back up your home folder and use it with another distro, without losing data. (though it can happen that stored settings are not compatible with some changed programs).
All your data is in your home folder.
It is of course possible but you’d likely be causing a big mess on the filesystem. If you’re able to move the install into a home directory, why not just archive what you need and restore it after reinstall? This would be the cleaner way to go about it.
This is one of the reasons to always prefer docker over bare metal, if it was docker all you had to do is copy the volume over the new installation and starting the service there.



