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!)