![]() ![]() I recommend to enrypt the destination, to make your data safe. ![]() run/media/alu/ALU - This is where you what to backup. mnt/ it is vital to exclude them if we connect a USB memory. The excluded folders depend directly on each of us, however, the /dev/, /proc/, /proc/ /sys/ /tmp/ /run/ /mnt/ and /media folders are not important to backup because rsyn will not copy their content. But make sure you change your working directory to root ( cd /) before you run rsync, otherwise the joint exclude option may not work. I typed exclude as a separate option for every directory. exclude - Excludes folders and files from backup. dry-run - This option simulates the backup. ![]() So, it will backup only new files and modified files and it will also delete all the files in the backup which were deleted on your system. That means, if it is not your first backup, it will backup only the difference between your source and the destination. delete - this option allows you to make an incremental backup. v - It will show the progress of the backup. Owner attributes or permissions will not be modified during the backup process. Mandatory use.īasically, these three options mean to preserve all the attributes of your files. Sudo - to execute the command as a superuser. We now proceed to explain what this command means: I know that not everyone is confident with the command line tools, but you will realize that the process is not that complicated and you can also back up your system using the command line. To make a backup with rsync, we usually use the command line. ![]() i, -id_rsa Specify the private ssh key to use.Sudo rsync -aAXv -delete -dry-run -exclude=/dev/* -exclude=/proc/* -exclude=/sys/* -exclude=/tmp/* -exclude=/run/* -exclude=/mnt/* -exclude=/media/* -exclude="swapfile" -exclude="lost+found" -exclude=".cache" -exclude="Downloads" -exclude=".VirtualBoxVMs"-exclude=".ecryptfs" / /run/media/alu/ALU/ rsync-get-flags Display the default rsync flags that are used for backup. If using remoteĭrive over SSH, -compress will be added. rsync-set-flags Set the rsync flags that are going to be used for backup. Not be managed by the script - in particular they will not be If this flag is set, generated files will rsync-append-flags Append the rsync flags that are going to be used for backup. After 30 days, keep one backup every 7 days.Īfter 365 days keep one backup every 30 days.ĭefault: "1:1 30:7 365:30" means after oneĭay, keep one backup per day. no-auto-expire Disable automatically deleting backups when out of space. Instead an errorĮach backup is on its own folder named after the current timestamp. Files can be copied and restored directly, without any intermediate tool.īackup to/from remote destinations over SSH.įiles that haven't changed from one backup to the next are hard-linked to the previous backup so take very little extra space. Safety check - the backup will only happen if the destination has explicitly been marked as a backup destination. Resume feature - if a backup has failed or was interrupted, the tool will resume from there on the next backup.Įxclude file - support for pattern-based exclusion via the -exclude-from rsync parameter.Īutomatically purge old backups - within 24 hours, all backups are kept. Within one month, the most recent backup for each day is kept. For all previous backups, the most recent of each month is kept. "latest" symlink that points to the latest successful backup.Ġ */1 * * * if grep -qs /mnt/backup /proc/mounts then rsync_tmbackup.sh /home /mnt/backup fiīackup sets are automatically deleted following a simple expiration strategy defined with the -strategy flag. #Grsync ubuntu seriesThis strategy is a series of time intervals with each item being defined as x:y, which means "after x days, keep one backup every y days". After 365 days, keep one backup every 30 days ( 365:30).īefore the first interval (i.e.After 30 days, keep one backup every 7 days ( 30:7).After 1 day, keep one backup every 1 day ( 1:1).The default strategy is 1:1 30:7 365:30, which means: UBUNTU GRSYNC SCHEDULE SERIES by default within the first 24h) it is implied that all backup sets are kept. Additionally, if the backup destination directory is full, the oldest backups are deleted until enough space is available. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |