Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

can I use the dd command to backup a file on a ftp server rather than network share?

share|improve this question
add comment

3 Answers

Please note that dd is not very efficient as a backup tool, it copies the entire partition space including used an unused space. Using partimage (package available from the repositories) is a better option. Because partimage does not have integrated FTP support you would need to use something like curlftpfs. I am not sure it would be reliable. FTP was designed to upload files previously created, not to update them incrementally.

share|improve this answer
    
dd can also take files as the if= argument, which might be what Abdul Khaliq means. (That is not a good way to perform backups, though.) –  Eliah Kagan Aug 16 '12 at 16:44
add comment

Other tools you might want to check out are tar and rsync. Creating backup tarballs is simple and there are lots of preconfigured lines out there.

Rsync might be your best bet. It does incremental backups and takes lots of options (again, look around for an rsync oneliner that does what you want). It doesn't result in one file though, but an exact copy of the folder structure and files.

share|improve this answer
add comment

Use this while logged into your ftp server via the ftp command:

put "|dd if=/dev/DISK0 bs=1m count=1000|bzip2" backup.bz2

of course, replacing DISK0 with your disk.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.