I just setup nextcloud with snap the way I want on my own mini PC. Now I want to make a backup of it if it got hacked or my RAID fails. I try now to backup it by copying the virtual HDD from Hyper-V but this will take over 10 hours by 3TB virtual HDD size. Is there a better way? I don’t need to backup my files as they are backed up on a different drive seppertly. For it’s important that I can restore the instance in case of a fail and sync all files up again.
The installation is on a VHDD on a iSCSI drive. It can be big as 15TB.
The nextcloud.export command is right what I want! But how do I get the backup out of my VM to my PC? I am sorry for asking this simple questions but I am still learning with Linux
EDIT
I just connected the backup folder as external storage in my nextcloud and will download it from there
Here’s a simplified backup strategy without the code:
Backup Database: Use a tool like mysqldump to back up your Nextcloud database. This ensures all your configuration and user data is safely stored.
Backup Nextcloud Data and Configuration: Use a backup tool (like rsync) to back up the Nextcloud configuration files and data directory, which holds metadata, user settings, and file indexes.
Incremental Backups: To avoid backing up the entire 3TB every time, use an incremental backup strategy. This only copies the files that have changed since the last backup, saving time and storage space.
Automate Backups: Set up scheduled backups using cron jobs. For example, back up the database daily and the configuration and data weekly. This ensures your backups are always up to date.
Off-Site Backup: Optionally, back up your data to an off-site location like cloud storage or a remote server. This protects your backups in case of physical damage to your primary setup.
This strategy allows for faster, more efficient backups compared to copying the entire virtual HDD and ensures you can restore your Nextcloud instance quickly in the event of a failure.
To back up Nextcloud efficiently, skip the 3TB VHDD copy. Use nextcloud.export for config and database, or tools like rsync and snapshots for key directories (data, config, apps). Hyper-V checkpoints are also a quick option for restoration and syncing.
Is the best for me at the moment. How do I make a cronjob for doing it every night at 4 AM? I don’t want to brick my system as I worked long for it to work the best for me yet