hi peeps.
Im early on my selfhosting journey and managed to setup some things as a test in docker. the main service im looking to run is ERPNext. after a while I got it up and running so now I want to back this up including all the customization I did in the app.
where to start with this? any intuitive guide?


Interesting.
Yep, I agree there’s 2 types of backups:
Out of curiosity, how are you doing the drive imaging?
I wrote a script that is fired by a cron job once a month:
sudo nano /usr/local/bin/backup_drive.shspoiler
# Directory to store backups BACKUP_DIR="/mnt/myhdd" # Drive to backup DRIVE="/dev/sdX" # Create a timestamp TIMESTAMP=$(date +"%Y%m%d") # Filename for the new image NEW_IMAGE="$BACKUP_DIR/my_drive_image_$TIMESTAMP.img" # Create the image sudo dd if=$DRIVE of=$NEW_IMAGE bs=4M status=progress # Keep the last 3 images ls -tp $BACKUP_DIR/my_drive_image_*.img | grep -v '/$' | tail -n +4 | xargs -I {} rm -- {}Make the script executable:
sudo chmod +x /usr/local/bin/backup_drive.shCreate Cron:
sudo crontab -e0 3 1 * * /usr/local/bin/backup_drive.shVerify cron:
sudo crontab -lI’m sure it could be written differently or that there is a better way to do the imaging, but that is the extent of my notes, and it works for me.
Ah, good old
ddWhen you have some spare time, take a look at
partclone- clonezilla uses it because it only backs up used blocks, not free space, so more efficient.Thanks for the tip. I’ll definitely check it out