automatically syncing files to a partition

Hey, I’m using opensuse 11.2 KDE. I have a backup repository that I like to sync my main files (music, pictures, documents, etc.) to. I was wondering if there is software, or a script, or something that I can use to automatically sync these files on a daily basis (or some set time)? I’ve looked around the internet a little bit, but I haven’t found anything too fruitful.

rsync is the command-line tool you’re looking for. There are several front-ends for it.

‘grsync’ comes to mind and is available in the packman repo, so I’d start there. I believe it will help you set up a daily sync, but if not post back and we’ll help you set up a cron.daily job.

OK, so I tried grsync, but the partition is password protected and it couldn’t work. I then tried gadmin rsync which had to be executed with a password. neither of them gave me an option for a daily sync.

You’ll most likely want to always run grsync (or any syncing program) with superuser privileges to make sure the file permissions, etc. get synced correctly, so you’re on the right track.

If grsync won’t do it, it’s still pretty easy to set up a script that runs your sync every day.

You can do it in 4 easy steps:

  1. Run grsync as a superuser, and set up your sync in grsync the way you want it. Hit “simulation”, and it should pop up a text box with the simulated results of your sync. Check to make sure everything looks kosher.
  2. If everything looked all right in step 1, look for a line near the top of the text box that starts with "rsync ". It will be something like “rsync -r -n -t -v --progress… blah blah blah”. Keep this text box open, because you’ll need to cut/paste this line.
  3. Still as su, create a new text document in the /etc/cron.daily/ directory. (This is a magical directory that runs any script placed inside it once, and only once, a day.) It can be called anything you want. Inside this new text document, input these two lines:
--CUT/PASTE THE "rsync...blah blah blah LINE" FROM STEP 2 HERE--

Save your new text file and close whatever program you used to edit it.
4. Change the properties on your new text file to “executable”.

That’s it. Follow these steps and you’ll create a cron job that runs your rsync script once (and only once) a day.

Sounds like you need to put your rsync command inside a shell script, and use cron to execute it every day at a given time.

If you don’t want to do the cron-scripting in my previous post, I just found “luckybackup” in the KDE “Community” repo. (One-click install here)

It is another rsync frontend, but looks like it has scheduling included, which I think is what you’re looking for. Remember you’ll still have to run it as a superuser to make sure it runs correctly.

Synkron also has scheduling, and works well on my setup. Can’t remember where I got it from, probably the Packman repo but just google it.

One-click install for synkron here.