You are not logged in.

#1 2008-03-02 13:46:09

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Simple Bash backup...

#!/bin/bash


# Backup /home/mrgeen directory
rsync -arvlt /home/mrgreen/ /media/'WD Passport'/Data/

# Backup Music
rsync -arvlt /media/music/ /media/'WD Passport'/Music/

# Backup Photos
rsync -arvlt /media/Pictures/ /media/'WD Passport'/Pictures/

#pacman -Q > /media/'WD Passport'/Data/arch_packages

# Backup /etc

sudo rsync -arvlt /etc/ /media/'WD Passport/Data/etc/

I use -arvlt but I keep getting operation not permitted so some of the files are not backed up ;-(

the sudo line may need work, I read wiki guide for daily backup... but I use an external usb drive to backup once a month

have I got rsync command right?

MrG


Mr Green

Offline

#2 2008-03-02 14:00:23

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Simple Bash backup...

Your errors are probably to do with setting permissions/times on your external hard-drive. Is it FAT32 formated.  That does not support some of this. I use

myrsync="rsync -trv"

in all my backup scripts.  Note from "rsync --help"

 -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)

Offline

#3 2008-03-02 15:44:51

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Simple Bash backup...

emm yes device is FAT I think I should reformat it.... then maybe filenames etc would work correctly

So can I like drop the -a ? use maybe -rlvt instead?

Thanks


Mr Green

Offline

#4 2008-03-02 22:30:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Simple Bash backup...

That would probably be the way to go.  But first look up the options that you will be leaving out and make sure you don't need them.  I can't remember what they do of the top of my head.

Offline

#5 2008-03-03 06:54:24

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Simple Bash backup...

thanks...

man rsync helps... :-)

Once I get it working I can use exclude etc. for /home [mozilla cache etc...]

Would like to get rsync only to update new files rather than create a full backup each time, maybe I need log file for that [more reading!]


Mr Green

Offline

#6 2008-03-03 09:03:56

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: Simple Bash backup...

rdiff-backup is good for you Mrgreen! <3

 community/rdiff-backup 1.0.5-4 - This is the installed version
    rdiff-backup makes incremental backups to local or remote locations

Offline

#7 2008-03-03 10:58:20

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Simple Bash backup...

awww man I wanted to write my own uber-geek-elite script for cli lol.... <3

Its got to be easy to setup or I will never be able to use it

thanks dude!

MrG


Mr Green

Offline

#8 2008-03-03 12:02:22

jonkristian
Member
From: Norway
Registered: 2007-03-09
Posts: 101
Website

Re: Simple Bash backup...

Just thought I'd add this to the list, http://www.boxbackup.org/


PROCRASTINATION
is like masturbation...it's good in the beginning, but in the end, you realize
you've just fkd yourself

Offline

#9 2008-03-03 13:37:43

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Simple Bash backup...

Right got external drive setup with ext2 [label Backup for easy mounting]

Thanks

MrG

Last edited by Mr Green (2008-03-03 17:40:18)


Mr Green

Offline

Board footer

Powered by FluxBB