Hi,
I want to run a script every evening by cron saving some folders in the home drive to an external drive as described in the wiki http://wiki.excito.org/wiki/index.php/B ... sing_Rsync.
Which crontab I should edit?
I would use nano for editing.
L.
Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
cron backup job
Re: cron backup job
Hello Ludwig,
Why use Rsync? you can use the backup feature within the bubba interface.
Or you can run a script with cron to create a regular copy or tar to the external drive.
Puma
Why use Rsync? you can use the backup feature within the bubba interface.
Or you can run a script with cron to create a regular copy or tar to the external drive.
Puma
Linux is like a wigwam - no windows, no gates, apache inside!
Re: cron backup job
Use the crontab of the user that is allowed full access to the folders that you want to backup. Or, the user that is allowed to do 'sudo rsync'...
This may be stating the obvious, but to edit a crontab: use crontab (with '-e'). This does implement nano on the B3 by the way, so nothing mystic there.
This may be stating the obvious, but to edit a crontab: use crontab (with '-e'). This does implement nano on the B3 by the way, so nothing mystic there.
Re: cron backup job
If there are multiple owners included in the backupset, AND you want to maintain and remember that ownership, only running the cronjob as root will suffice.
Re: cron backup job
There are different needs.Puma wrote:Why use Rsync? you can use the backup feature within the bubba interface.
The backup function in bubba lets you go back to the time from which you wish to restore a file but it uses a not-very-human-friendly format. My initlai backup created some 48000 five megabyte .difftar.gz files.
In other cases you might wish to just keep and update a snapshot of the current contents of certain folders at another location, either a local external drive or remote server. That's where rsync outsmarts and outperforms the backup function in bubba.
Here's my rsync script used to keep a secondary mirror of the music, pictures and video folders.
Code: Select all
rsync --archive --acls --delete-delay --verbose --stats --itemize-changes --progress --human-readable /home/storage/music /home/storage/pictures /home/storage/video /home/storage/extern/usb-mybook/B3_backup/media_folders/
Re: cron backup job
Dear all,
thanks for the answers. However, my question was not included. I think I know how to use nano. And usually I log in to my B2 every week via ssh and perform rsync as su manually for different folders, which also include user folders. I want to let this be done by a script and cron. rsync performes nicely for me, so I agree with gonk.
So here are my questions:
- Which crontab should I edit (I learned there are different ones on bubba)?
- What should I include in the script so it is run as su and saves all data as described above?
- Something else to know?
thx,
L.
thanks for the answers. However, my question was not included. I think I know how to use nano. And usually I log in to my B2 every week via ssh and perform rsync as su manually for different folders, which also include user folders. I want to let this be done by a script and cron. rsync performes nicely for me, so I agree with gonk.
So here are my questions:
- Which crontab should I edit (I learned there are different ones on bubba)?
- What should I include in the script so it is run as su and saves all data as described above?
- Something else to know?
thx,
L.
Re: cron backup job
Every user (including root) has it´s own crontab and as a rule the smart money is to not do it as root. In the case of using rsync for system backup, root rights will however be required - hence the need for sudo if the backup job is started by any other user then root itself (e.g. when remotely triggered through ssh). To edit a crontab, logon as the user to which that crontab belongs (or `su` to become that user) and issue `crontab -e`; that's all there is to it.