smoothback FAQ

1. What files do I need to download?

2. How do I run smoothback?

3. Can I see an example of a production smoothback.sh?

4. What does smoothback require to run?

5. How can I help smoothback?

6. Why do I get errors with X dir/file?

7. How do I use a non-standard SSH port?

8. I need root access for a dir, but I heard accessing ssh as root is bad!

9. Why can't hardlinks handle more than 20 days of backups?

10. Okay, all that aside, how does smoothback work?


1. What files do I need to download?

Download smoothback.sh.

2. How do I run smoothback:

Once you have configured smoothback using your favorite text-editor, give your user execute permission and run it:

$ chmod 544 smoothback.sh
$ ./smoothback.sh
Alternatively:
$ chmod 544 smoothback.sh
$ /bin/sh smoothback.sh

3. Can I see an example of a production smoothback.sh?

Yes, the file smoothback.v.1.4.sh-example.txt is a current/in-production copy of smoothback.v.1.4 that I am using on a Linux machine to backup a NetBSD machine. You can see in smoothback.v.1.4.sh-example.sdiff the minimal amount of changes necessary to take my stock setup and make it a working production copy. The only additional changes in this case necessary would be to make sure that your /etc/hosts has an entry for the machine "emiline" such as:

10.0.0.11 emiline
and that your /etc/ssh/ssh_config has entries for emiline if it is using an alternative port, such as:
Host emiline 
Port 3251
Provided both of those are setup and you have a user on both machines with the same name (and preferably ssh-keys setup) you're good to go.

4. What does smoothback require to run?

rsync > 2.6.4, /bin/sh, and an ssh/sshd implementation.

5. How can I help smoothback?

Please submit an e-mail to code@dayid.org with any problems you encounter. Whether it is working or something has broken, please include your smoothback.sh file (as you have edited it) as well as the output of: /bin/sh -x smoothback.sh > smoothback.log 2>&1

6. Why do I get errors with X dir/file?

Your user doesn't have proper permissions, that is a 10-to-1 bet. That said, Fedora and Ubuntu users report problems with .gvfs (when attempting to sync their $HOME) because it is a special filetype. You should define inside of rsyncopt="" and append a --exclude=.gvfs so that (from stock) that line would be:

rsyncopt="-c -g -l -o -r --stats  -t -u -z -n --exclude=.gvfs"

7. How do I use a non-standard SSH port?

Properly configure your /etc/ssh/ssh_config to know what port the machine's ssh is on (please tell me you haven't been doing ssh -p #### everytime you connect!).

Host othermachine
Port ####

8. I need root access for a dir, but I heard accessing ssh as root is bad!

In this case I highly recommend you use ssh-keys (as I recommend using for any ssh transaction). See also the option in your sshd_config for "PermitRootLogin" and consider using "without-password". This will allow root login over ssh if you are using authentication other than a regular password (e.g., ssh-key).

9. Why can't hardlinks handle more than 20 days of backups?

rsync cannot currently use more than 20 arguments for --link-dest. This is not the fault of smoothback, but a limitation of rsync's current implementation.

10. Okay, all that aside, how does smoothback work?

Smoothback connects from the machine it is being run on to the remote machine you have specified. From there it compares the files on the remote machine to the copies on the local/machine that is running the script. If the files differ, it transfers them. Things get more complicated if you're using multiple-backup-copy hardlinks, but you should not be using these if you are not familiar with how rsync works with these options.