Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to back up my $HOME at Ubuntu by copying the home directory to a SSH server using scp.

But I found that the copy operation soon fell into some endless cycle, repeatedly copying some files. I found some of these files were in my dropbox directory under $HOME, and I was not able to check if there were files in other directories. During that backup, I only had local network connection and not internet connection to connect to dropbox server.

I was wondering if someone happens to know what is happening? Copying which directories under $HOME may cause endless cyclic operations? What non-user created directories are worth backup?


share|improve this question
"worth of backup" .. that depends on what is worth to YOU :) – akira Feb 12 '11 at 19:24
@akira: ~/.porn/, of course. – grawity Feb 12 '11 at 20:21

Use rsync. It uses SSH as transport like scp, but is more suited to backups because of the abilities to preserve file metadata and to only copy changed files.

rsync -avAXSP ~ backupserver:/backups/Tim/

(Here -A and -X mean "preserve ACLs and xattrs". If these features are disabled on your backup server, remove these two options.)

share|improve this answer

scp -r ${HOME} user@server:/location/to/backup/to.

Or from the server:

scp -r user@computer:~/ /location/to/backup/to.

As grawity stated you are better off using rsync. Or a much more powerful solution is rsnapshot. Both will work over ssh so you don't need to install anything besides the client (rsycn or rsnapshot) onto the machine you want to run the backups from.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .