Ubuntu: Can I use dd command to backup a partition on a FTP server?


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


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.


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.


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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »