Sample Header Ad - 728x90

How to make tar save the archive on a remote machine using sftp or ftp?

13 votes
5 answers
43864 views
I would like to backup some of my very important data on a remote machine. Currently I'm just saving it to my local machine by using this command: tar -cvjf ~/backups/Backup.tar.bz2 ~/importantfiles/* I would prefer not using another command to transger it to the remote machine, meaning I would like to just have this command being upgraded so it can transfer the data to the remote machine. This is designed to be in a script later that is suposed to run on its own, meaning any type of required user input would completly mess it up! Something like tar -cvjf sftp://user:pwassword@host/Backup.tar.bz2 ~/importantfiles/* tar -cvjf ftp://user:pwassword@host/Backup.tar.bz2 ~/importantfiles/* would be perfect! (No pipes (etc.), just one command!)
Asked by BrainStone (3784 rep)
Oct 14, 2013, 01:17 PM
Last activity: Aug 25, 2024, 03:34 PM