Hello, I would like a quick, simple, manual way to backup my code at the end of the day.

Currently, when I'm done programming on my school's Linux cluster for the day I log out, which leaves me at another Linux computer that I have to pass through to get to the cluster. To save my code, I use the scp command as follows (where yyyymmdd is the date):

This method works well: it's quick, simple, and notes the date of the backup and I control it (and I could probably even figure a way to write a script to make it a single command, if I made the effort). But it also changes the copied files' dates, which I do not like.

Is there an quick, easy backup method, which I can use on command, which will date stamp the backup files?

Note that I am using a Bash shell and that the cluster's disk space is not to be used for backup.

Thanks

11-15-2012

cnamejj

This might work and you could just make it script if you don't want to type it every time.

Instead create a svn or git repository on the server, that is reachable via ssh.
With that you do not need to worry about timestamps yourself,
the transfer is much more efficient because only the diffs are needed
and you get all the goodies of a revision control system (diffs, rollbacks, tool integration, etc), which a simple file backup doesnt have.

11-15-2012

cnamejj

Quote:

Originally Posted by Irithori

My recommendation would be to not use tar or scp here.

Instead create a svn or git repository on the server, that is reachable via ssh.
With that you do not need to worry about timestamps yourself,
the transfer is much more efficient because only the diffs are needed
and you get all the goodies of a revision control system (diffs, rollbacks, tool integration, etc), which a simple file backup doesnt have.

I completely agree that a repository is better if you can set one up or use an existing one.

11-15-2012

Irithori

Well, the repo needs its own backup (dump) then, but this is a different story :)

11-16-2012

mizzle

Quote:

Originally Posted by StupidUser

Hello, I would like a quick, simple, manual way to backup my code at the end of the day.

Currently, when I'm done programming on my school's Linux cluster for the day I log out, which leaves me at another Linux computer that I have to pass through to get to the cluster. To save my code, I use the scp command as follows (where yyyymmdd is the date):

This method works well: it's quick, simple, and notes the date of the backup and I control it (and I could probably even figure a way to write a script to make it a single command, if I made the effort). But it also changes the copied files' dates, which I do not like.

Is there an quick, easy backup method, which I can use on command, which will date stamp the backup files?

Note that I am using a Bash shell and that the cluster's disk space is not to be used for backup.

Thanks

From man page for scp:

-p Preserves modification times, access times, and modes from the original file.

11-16-2012

StupidUser

Quote:

Originally Posted by Irithori

My recommendation would be to not use tar or scp here.

Instead create a svn or git repository on the server, that is reachable via ssh.
With that you do not need to worry about timestamps yourself,
the transfer is much more efficient because only the diffs are needed
and you get all the goodies of a revision control system (diffs, rollbacks, tool integration, etc), which a simple file backup doesnt have.

Quote:

Originally Posted by cnamejj

I completely agree that a repository is better if you can set one up or use an existing one.

Quote:

Originally Posted by Irithori

Well, the repo needs its own backup (dump) then, but this is a different story :)

Quote:

Originally Posted by cnamejj

This might work and you could just make it script if you don't want to type it every time.

svn and git are not installed and surely would not be. Admin's policy is not to allow backups (of any significant size, anyway) on the system. Besides, when - by which I mean "if" - I ever get this thing working, the data will take up plenty of disk space.

I think tar is what I was looking for. I can use a combination of tar and scp to make the backup, then copy it to another system (and then remove it from the cluster).

12-07-2012

mjjones

Old thread, I know, but you might want to check out ElephantDrive - we just made a linux package available.
home.elephantdrive.com/linux/

12-07-2012

StupidUser

Quote:

Originally Posted by mjjones

Old thread, I know, but you might want to check out ElephantDrive - we just made a linux package available.
home.elephantdrive.com/linux/

Thanks for the info. I still refer to this thread to refresh my memory, so it's not that old.
ElephantDrive looks to be useful, but is overkill for my very simple needs and the admin would not allow this to be installed on our cluster.