CS Account Backup

From Computer Science
Jump to: navigation, search

If you want to create a backup of your account on the CS server, you can do the following.

First, create a zip file that contains the files you want to backup. The following creates a zip file account_backup.zip that contains all files except the .cache directory and account_backup.zip.

find . ! -name account_backup.zip -path "./.cache" -prune -o -print | zip -@ account_backup

If you wanted to just zip certain directories (for example, the directories h1, h2, h3, h4) you could to this instead.

zip account_backup h1 h2 h3 h4

Once you have a zip file with the files you want, you transfer it to wherever you want to keep it. If you want to transfer to your personal computer, use an sftp program to transfer to your computer. If you want to transfer to a different account on the CS server (or on some other unix/linux/mac server) you can use the text-based sftp program. If I wanted to transfer the account_backup.zip file to some_server.indstate.edu with account someLogin on that system, I would do the following.

# already logged in on the CS server, then run the following in the terminal - 
sftp someLogin@some_server.indstate.edu

# may have had to enter password, and once you do that you are in the sftp program
#  and can issue sftp commands, for example put to send the file to some_server
put account_backup.zip
quit