Backup a whole drive or mount point on Linux


I want to do a backup of a whole partition in Linux. Image backup is not supported so I want to backup the files.

If I set the default directories to “/” I assume to backup all mounted volumes (for example /media/…). How can I tell UrBackup to only backup all files from a specified mount or partition?

For example I have this:

/dev/sda1 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro,data=ordered)
/dev/sdb1 on /media/00fc206e-9549-4147-a0d8-a9a5c73ab6b6 type ext4 (rw,noexec,relatime,data=ordered,jqfmt=vfsv0,usrjquota=aquota.user,
/dev/sdc1 on /media/d9d617a1-cb1f-4473-97c1-411edb5983ef type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)

And I only want to backup all files from /dev/sda1

If you backup with a snapshot this will automatically happen. Otherwise you’ll have to add / with urbackupclientctl add-backupdir -d / --one-filesystem.

I don’t use the command line to call the client. I use the client daemon which is controlled by the server configuration. Where can I set this in the configuration?

See then ( 8.3.4 Default directories to backup ).

Oh, I already read this but didn’t read the flags part. Sorry and thank you!

But now: How to write it?
The seperator is “/” and the path is “/” too. So it would be: “//one_filesystem,follow_symlinks,symlinks_optional,share_hashes”
Or do I need to use “” as seperator instead?

(How would the software know if “/bla/one_filesystem” is “/bla”+“one_filesystem” or “/bla/one_filesystem”+"" ?)

I tried now “/media/1a5fbc04-f738-4a9f-95d0-f69f43952f0a;/|system drive/follow_symlinks,symlinks_optional,share_hashes,one_filesystem” but it fails with message:
Constructing of filelist of “omv” failed: no backup dirs. Please add paths to backup on the client (via tray icon) or configure default paths to backup.

That should have worked. Can you check if it got transferred to /usr/local/var/urbackup/data/settings.cfg on the client?

default_dirs_def=/media/1a5fbc04-f738-4a9f-95d0-f69f43952f0a;/|system drive/follow_symlinks,symlinks_optional,share_hashes,one_filesystem

(How do you do the code markup?)

Maybe there’s a hint in /var/log/urbackupclient.log ?

There was nothing about that. I now restarted UrBackup server and client daemons and now (without changing the configuration) it seems to work. Actually 26% done.

Finished and only this partition was backuped. I have some errors in the log but it worked:

03.11.16 17:13
Error getting complete file “q0WxvKmkTu5K5yWIKfip|system drive/usr/local/var/urbackup/data/filelist_new.ub” from omv. Errorcode: CANNOT_OPEN_FILE (3)

03.11.16 17:17
HT: Error getting free space for path “/media/d9d617a1-cb1f-4473-97c1-411edb5983ef/urbackup/omv/161103-1709/system drive/var/cache/openmediavault/cache.omv\controlpanel\administration_admin_js.json”

03.11.16 17:17
HT: Error getting free space for path “/media/d9d617a1-cb1f-4473-97c1-411edb5983ef/urbackup/omv/161103-1709/system drive/var/cache/openmediavault/cache.omv\controlpanel\login_js.json”

03.11.16 17:18
Metadata file and “/media/d9d617a1-cb1f-4473-97c1-411edb5983ef/urbackup/omv/161103-1709/system drive/var/cache/openmediavault/cache.omv\controlpanel\administration_admin_js.json” do not exist. Skipping applying metdata for this file.

03.11.16 17:18
Metadata file and “/media/d9d617a1-cb1f-4473-97c1-411edb5983ef/urbackup/omv/161103-1709/system drive/var/cache/openmediavault/cache.omv\controlpanel\login_js.json” do not exist. Skipping applying metdata for this file.

03.11.16 17:19
Not all folder metadata could be applied. Metadata was inconsistent.