Results 1 to 2 of 2
I'm trying to back up a few directires on an ubuntu box /stor and /etc ... I've seen stuff for rsync and rdiff ... but they all involve creating certs ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-25-2011 #1
- Join Date
- Jan 2008
Simple Ubuntu Backup
I've seen stuff for rsync and rdiff ... but they all involve creating certs and keys ... and generally require a bit more than I need.
I just want to do a SIMPLE backup of /stor /etc to /mnt/backup. It is using a cifs share so no ssh or certs or keys needed.
What would I need to do to back this up daily?
- 03-25-2011 #2
I wrote a script for performing incremental backups everyday and an entire backups on Mondays:
#!/bin/bash # Mount Windows share to '/mnt' directory mount -t cifs -o username=<win-user>,password=<password> //host/share /mnt # Incremental backup INC=`date | grep "Mon"` # Check if it's Monday if [ -z "$INC" ]; then # If it isn't Monday, perform incremental backup tar --create --compress \ --file=/mnt/backup.tar.gz \ # Location to save tar file to --listed-incremental=/var/log/snapshot.snar \ # Incremental snapshot ~/example # Directory to be backed up else # If Monday, perform full backup tar czf /mnt/backup.tar.gz /stor /etc fi # Now that files have been archived+compressed to server, unmount CIFS share umount /mnt
00 4 * * * ~/backup_script.sh # Backup daily at 4:00am
If you need assistance with the script, let me know. Hopefully it fits what your looking for. If not, I'll be happy to help you find a more suitable alternative.