GNU backup

Technical issues/questions of an intermediate or advanced nature.
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

GNU backup

Post#1 by Rava » 18 Jan 2018, 09:23

Is there a better help solution and good explanations ion how to set up the GNU backup script?

It only says that it needs certain folders, and certain files, and I tried to set it up without having its man page but to no prevail.

I thing having an easy to handle backup solution available to the user would be a neat plus for our OS...
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

GNU backup

Post#2 by Ed_P » 18 Jan 2018, 14:57

Rava wrote:
18 Jan 2018, 09:23
Is there a better help solution and good explanations ion how to set up the GNU backup script?
:%) What GNU backup script are you referring to?
its man page
Is this the man you are referring to? http://dl.porteus.org/x86_64/Porteus-v3 ... arch-1.xzm
Ed

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

GNU backup

Post#3 by Blaze » 18 Jan 2018, 16:43

How about cron?

Code: Select all

su
toor
crontab -e
# Run daily cron jobs at 19:30 every day:
# Press Insert key and type
30 19 * * * dir2xzm /path/to/dir/ /path/what/you/want/to/save/backup-$(date +%Y-%m-%d).xzm
# Press Esc key and press Shift-ZZ to save
# Check that all changes are well done
crontab -l
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

GNU backup

Post#4 by Rava » 20 Jan 2018, 14:32

The script itself is called backup ... and it uses tar. Since I am currently not at any Porteus machine I cannot look it up exactly and tell you in which Port version it is, and maybe it which it is no longer present...
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

GNU backup

Post#5 by Ed_P » 20 Jan 2018, 15:12

Well, apparently backup is still available. I've never used it but it does exist.

Code: Select all

root@porteus:/home/guest# backup --help
/usr/libexec/backup.sh: line 62: hostname: command not found
usage: backup [OPTIONS] [WHEN]
Options are:

   -l, --level=LEVEL       Do backup level LEVEL (default 0).
   -f, --force             Force backup even if today's log file already
                           exists.
   -v, --verbose[=LEVEL]   Set verbosity level. Default 100.
   -t, --time=TIME         Wait till TIME, then do backup.

Informational options:
   -h, --help              Display this help message.
   -V, --version           Display program version.

   Optional argument WHEN is for backward compatibility only. It has been
   superseded by --time option.
   TIME argument can be one of:

	now          --     do backup immediately.
	HH           --     do backup at HH hours.
	HH:MM        --     do backup at HH:MM.

Send bug reports to bug-tar@gnu.org.
root@porteus:/home/guest# backup -V
/usr/libexec/backup.sh: line 62: hostname: command not found
backup (GNU tar) 1.29
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@porteus:/home/guest#
Maybe the gnu.org website might offer you more help on how to use it.

Code: Select all

root@porteus:/home/guest# contrab
bash: contrab: command not found
root@porteus:/home/guest# 
contrab not so much.
Ed

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

GNU backup

Post#6 by Blaze » 20 Jan 2018, 16:05

Sorry, I have done mistake - crontab is right
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

GNU backup

Post#7 by Ed_P » 20 Jan 2018, 16:49

crontab does indeed exist.

Code: Select all

guest@porteus:~$ crontab
crontab 4.5
crontab file [-u user]  replace crontab from file
crontab -  [-u user]    replace crontab from stdin
crontab -l [-u user]    list crontab
crontab -e [-u user]    edit crontab
crontab -d [-u user]    delete crontab
crontab -c dir <opts>   specify crontab directory
guest@porteus:~$ crontab -l
no crontab for guest
guest@porteus:~$ crontab -l -u root
-u option: superuser onlyguest@porteus:~$ su
Password: 
root@porteus:/home/guest# crontab -l
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null.  We'll do this here since these jobs should run
# properly on a newly installed system.  If a script fails, run-parts will
# mail a notice to root.
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this.  If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 19:30 every day:
30 19 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
root@porteus:/home/guest# 
"the output of a cron job mailed to you" :o mailed!! :%)
Ed

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

GNU backup

Post#8 by Blaze » 20 Jan 2018, 17:42

You must to run crontab as root user

Code: Select all

su
toor
I use crontab at job for backup data from network hard drive to the local hard drive. In my home and job routers I use crontab too for restart him

Code: Select all

5 4 * * * reboot
at 04:05 every day :)

If you don't know how to use vi text editor , you can open as root /var/spool/cron/crontabs/root and tweak it via your GUI notepad.
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

GNU backup

Post#9 by Rava » 22 Jan 2018, 11:56

Yes, crontab is nice... so it seems no one from the regular porteus crew ever used that "backup" script?
Cheers!
Yours Rava

Post Reply