![]() In other words when the user vmail is the owner of a file at the source, rsync will make the user vmail also the owner at the destination (even when they have different UID/GID numbers). ![]() ![]() Users and groups with the same names can have different UID/GID numbers on different systems.īy default rsync will try to match the ownership by username resp. When there is no mapping from UID/GID's to usernames and groupnames tools will simply display those numbers instead. The -a option includes the -o, -owner, -g, -group options designed to preserve ownership.Īt the file-system level user and group ownership is stored in UID resp. Otherwise you can't create files and directories with a different user other than your own. For example, you can create a simple bash script that runs the specified rsync commands, and you can schedule backups using tools like KCron.How rsync preserves ownership of files depends on two things:Īre you super-user (root) on the destination? Once you have the basic backup system in place, you can improve it. If you are not sure what each check box does, hover the mouse over it to see a pop-up window with a brief explanation. You can then enter the paths to the source and destination directories and specify the desired options by ticking check boxes. To create a new profile, press the program’s Add button, give the profile a name, and press OK. It also allows you to create and manage multiple backup profiles (called sessions). If working from the command line doesn’t tickle your fancy, try grsync, a graphical front end to rsync that makes the backup process simple. Rsync -verbose -progress -recursive -times -perms -compress -delete /home/dmpop/.mozilla /home/dmpop/smbshare/backup/ As an example, here is the command I use on my machine to back up Firefox settings: If you haven’t tried rsync, take a look at Back up like an expert with rsync, which will help you to get started. For that you need rsync, a popular command-line synchronization and backup tool. Once the Samba share has been mounted, you can use it as a place to which to back up local files and directories. Smbmount //smb/share /home/user/sambashare -o credentials=/home/user/smb_credentials You can then point smbmnt to the credentials file: For better security, you might want to save credentials in a text file (e.g. While you can specify the user name and the password directly in the command, that’s not especially secure, since they are then recorded in the. The second path points to the mount point on your local machine that you created earlier. The //smb/share part refers to the actual path to the Samba share - for example, //192.168.1.7/Documents. Smbmount //smb/share /home/user/sambashare -o username= smbusername,password= smbpassword You can then mount the Samba share into the created sambashare directory using a command like: For example, you can create the sambashare folder in your home directory. Next, you have to create a mount point - a directory where the Samba share will appear. By default, you can use smbmount only as root, so if you want to be able to run it as a non-root user, you have to change its permissions by using the following command: With smbfs installed, you can mount a Samba share using smbmount, a clever little tool that mounts a Samba share to your local file system as if it were a directory on your hard disk. On a Debian-based system you can use either the Synaptic package manager or the sudo apt-get install smbfs command. While many Linux distributions come with smbfs preinstalled, on other distros you have to install the package. And since both programs are available as packages for most Linux distributions, you don’t have to get your hands dirty compiling from source code and fiddling with settings.īefore you get started, check whether the smbfs package is installed on your machine. Need a simple yet effective way to back up your laptop or desktop machine to a network-attached storage device or a network hard disk running Samba? Using Samba’s smbmount utility and the grsync backup tool, you can set up a backup system that is both reliable and straightforward in use.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |