We are running a nextCloud V9 instance on our BlueCloud shared hosting. We use SSH to do most of work on this shared server. One thing I miss is that SUDO is not allowed. This makes the nextCloud Update application unusable. The Updater app automates many of the steps of upgrading an nextCloud installation. It is useful for installations that do not have root access, such as shared hosting, for installations with a smaller number of users and data.
So it’s off to the manual upgrade method. Backups, can I repeat that “Backups”. The applications, database, documents and settings. The database and documents backups should be done more frequently than when a new nextCloud update comes along.
You can do your backups from a Windows system and just use FileZilla to connect to the BlueHost and copy the files someplace secure. It is even possible to set up a SFTP connection and use a key file to better secure this scenario. However this isn’t as automatic or as scheduled as I want.
CGYWIN and RSYNC
If you are a Linux diehard using a Windows workstation you might have a Linux like environment called CGYWIN set up where you can run your standard Linux RSYNC command. I like this approach as it allows for scheduled backups and could be run from with your Windows environment or Linux environment. Most Windows folks I know don’t have CGYWIN installed or understand the somewhat complex options for the Linux RSYNC command.
Free File Sync is an Open source, cross platform GUI based tool for doing and scheduling backups. I have used RoboCopy and SyncToy and find that FreeFileSync us much better. The UI is a little dated. like something from the 80’s, but it is a solid functional tool.
To connect to our nextCloud document directory we need to use a SFTP connection to the BlueHost. SFTP is not turned on by default and to turn it on you will need SSH access to your Bluehost account. Now this sounds like a pain but it is something you should have configured if you are managing your Bluehost server correctly. Bluehost has a good article on getting SSH access configured.
For a more secure FTP client upload, use SFTP (Secure File Transfer Protocol port 22).You will need to enable SSH/Shell access on your account. If you do not already have SSH/Shell access, Click Here to learn how. Note: Only your main FTP/cPanel username can be used for SFTP access. FTP accounts created using the FTP Accounts tool will not work. We use FileZilla just to verify the SFTP we set up works correctly. I wished that we could use our SSH keys to secure the connection.
NextCloud document directory
If you followed the nextCloud installation instructions you have put the place where the documents are stored NOT in or under the public_html directory where web hackers can get to it. It’s a good idea to create a special directory under the BlueHost root directory (ie: nextCloud).
So lets start up FreeFileSync from the Windows start menu and start to configure a backup scenario. The left panel is where the data is COMING FROM. In this case it is the BlueHost system.
Then we can provide the creditentials for the SFTP connection, remember they are identical to BlueHost control panel creditentials.
Use the (Browse) button. 1. It will test if your creditentials are correct and 2. Make it much easier to local the exact named nextCloud document directory.
Then we need to tell Free File Sync the TO DIRECTORY where the nextCloud document files will be backed up to.
We should tell Free File Sync how we want this scenario to function, so click on the big Blue Compare (Gear) ICON.
Start with how File Sync will compare what is on BlueHost agsint where our backup is.\
Then tell Free File Sync you want to compare everything.
Lastly explain you want to update everything on the DESTINATION (TO) right hand side of the page.
Now we should compare the differences, since this is the first time I ran this everything will be differnt.
What we have been waiting for folks….
Now the Sync process begins and the little man at the top of the form starts to dig. Don’t understand why digging is associated with synchronization but…
In God We Trust, everything else we verify, so lets do the (Compare) again.
Now it would be a good idea to save this scenario also known as a (ffs_gui). This file can used with the Coomand Line version of Free File Sync and either a PowerShell or CMD script to schedule it.
Because I have a lot of things I sync up I’ve come up with a naming standard.
So the Free File Sync config file named BlueHost_NextCloud_Documents.ffs_giu
BlueHost – Server
nextCloud – Application
Dcouments – Data Content
Summary: Yea I know this is a lot that is not directly related to getting Version 10 of nextCloud upgraded, but backups are important. Free File Sync can help reduce the headache associated with doing backups, maybe you might actually do them more often!
Free File Sync is available on Windows, MAc and Linux. Microsoft Powershell is available on Windows, Mac and Linux, do you see a pattern here?
nextCloud Application directory
The nextCloud instructions indicate you only need to back up certain directories. I’m going to do the entire directory because I would end up missing one of required directories.