Rclone and You: Neocities Backups
Important Notes: I use Arch Linux, specifically Endeavour OS. YMMV on other distros, and I have no idea how to do this on Windows or Mac.
So, if you're like me, you may often be beset by sudden ennui and want to remake your entire website. This sucks, though, because you may regret this and want to go back but find yourself unable to do so. So, you should create a backup first.
However, creating backups may be difficult. Webdav can be a slow pain in the ass, and your website may be too big to download it directly from Neocities. What then?
RcloneThe official Rclone website
If you're comfortable with your command line and want to make a backup, you may be interested in Rclone. It's a fairly simple set up process that I will guide you through here.
!!!NOTE!!! Rclone does require you to be able to use webdav to work, and as such requires you to be a supporter.
STEP ONE: Download Rclone
Download Rclone following the instructions on their downloads page.
In my case, Rclone is available as an Arch package.
STEP TWO: Connecting Rclone to Neocities
From here, we're going to be in the command line.
The first command you want to run is 'rclone config'
From here, you're going to enter "n" to create a new remote.
The first prompt should be for you to name this remote. This remote name doesn't matter and is just for your own convenience. For the purposes of this tutorial, I'll name my remote 'Tutorial'.
After you enter this name, you're going to get a giant wall of text asking you what type of storage you're using. Select option 45, Webdav.
Next, you're going to see that it is asking you for a url of a host. You will enter https://neocities.org/webdav.
You do NOT need the dav: before this url to make this work. If you copy and paste the entire line from the neocities page for webdav, you will run into an error. Use JUST the url.
Next screen you see is going to be asking for a vendor. Just press enter, there's nothing to input here.
The next screen is going to ask for your username: Enter your main neocities username.
After this, it will ask for your password.
Do NOT use the default option. Make sure you enter Y and type in your own password. The password you type in will be your neocities password.
After you enter and confirm your password, the next screen will ask you for a bearer_token. This isn't relevant, leave this screen blank and move on.
If you're familiar with this program and want to use the advanced config option in the next step, feel free. Otherwise, it isn't important. Skip this.
If you see this screen, congrats! You're done. Save this remote by pressing enter (saving is the default command) and exit the config.
STEP THREE: Making the Backup
Now that you're done with the config, the next part is easy. You need to use the rclone copy command.
The rclone copy command works as such:
rclone copy source:path dest:path
The source path is going to be the remote you set up. Use the name of the remote making sure to add a colon after the name.
The destination path is your choice. For this example, I'll be saving everything into my downloads folder in a folder called "Neocities_Backup"
Using the criteria above, my version of the command will look like this:
rclone copy tutorial: Downloads/Neocities_Backup
Press enter. If you don't see anything in your terminal window, This is good. If everything is working smoothly, it should be running silently and not throwing out any messages into the terminal.
If you want to check on things, go to the destination where you're copying your files. You should notice a new folder under the name that you specified in the dest part of your rclone command.
As you can see, the folder is there! Looking inside, you can see files being added as rclone copies your files over.
At this point, you just need to wait. Do not close your terminal window until the process is done. The best way to tell its done is that it will let you input commands into the terminal window again rather than just having a blank line underneath your previous command.
Once the process is done, check the folder that rclone created. Everything from your Neocities directory should be in there. Congratulations! If you need any help, feel free to leave a comment and I'll try to help you troubleshoot anything that went wrong.